com.alachisoft.ncache.licensing.config.NCacheInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-common Show documentation
Show all versions of nc-common Show documentation
Internal package of Alachisoft.
// Copyright (c) 2020 Alachisoft
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License
package com.alachisoft.ncache.licensing.config;
public class NCacheInfo {
private ProductInfo privateProduct;
private UserInfo privateUserInfo;
private DeploymentInfo privateDeploymentInfo;
public final ProductInfo getProduct() {
return privateProduct;
}
public final void setProduct(ProductInfo value) {
privateProduct = value;
}
public final UserInfo getUserInfo() {
return privateUserInfo;
}
public final void setUserInfo(UserInfo value) {
privateUserInfo = value;
}
public final DeploymentInfo getDeploymentInfo() {
return privateDeploymentInfo;
}
public final void setDeploymentInfo(DeploymentInfo value) {
privateDeploymentInfo = value;
}
public String getXmlString() {
String xml = "";
xml += getProduct().ToXml();
xml += getUserInfo().ToXml();
xml += getDeploymentInfo().ToXml();
xml += " ";
return xml;
}
public NCacheInfo() {}
protected NCacheInfo(Builder builder) {
this.privateUserInfo = builder.privateUserInfo;
this.privateProduct = builder.productInfo;
this.privateDeploymentInfo = builder.deploymentInfo;
}
public static class Builder {
private final UserInfo privateUserInfo = new UserInfo();
private final ProductInfo productInfo = new ProductInfo();
private final DeploymentInfo deploymentInfo = new DeploymentInfo();
public Builder setAddress(String privateAddress) {
privateUserInfo.setAddress(privateAddress);
return this;
}
public Builder setCity(String privateCity) {
privateUserInfo.setCity(privateCity);
return this;
}
public Builder setCompany(String privateCompany) {
privateUserInfo.setCompany(privateCompany);
return this;
}
public Builder setCountry(String privateCountry) {
privateUserInfo.setCountry(privateCountry);
return this;
}
public Builder setEmail(String privateEmail) {
privateUserInfo.setEmail(privateEmail);
return this;
}
public Builder setExtCode(String privateExtCode) {
privateUserInfo.setExtensionCode(privateExtCode);
return this;
}
public Builder setFirstName(String privateFirstName) {
privateUserInfo.setFirstName(privateFirstName);
return this;
}
public Builder setLastName(String privateLastName) {
privateUserInfo.setLastName(privateLastName);
return this;
}
public Builder setPhone(String privatePhone) {
privateUserInfo.setPhone(privatePhone);
return this;
}
public Builder setZip(String privateZip) {
privateUserInfo.setZip(privateZip);
return this;
}
public Builder setState(String privateState) {
privateUserInfo.setState(privateState);
return this;
}
public Builder setInstallCode(String installCode) {
productInfo.setInstallCode(installCode);
return this;
}
public Builder setDotNetInstallMode(String privateDotNetInstallMode) {
productInfo.setDotNetInstallMode(privateDotNetInstallMode);
return this;
}
public Builder setHttpPort(String privateHttpPort) {
productInfo.setHttpPort(privateHttpPort);
return this;
}
public Builder setInstallDir(String privateInstallDir) {
productInfo.setInstallDir(privateInstallDir);
return this;
}
public Builder setLastReportTime(String privateLastReportTime) {
productInfo.setLastReportTime(privateLastReportTime);
return this;
}
public Builder setPlatform(String privatePlatform) {
productInfo.setPlatform(privatePlatform);
return this;
}
public Builder setSPVersion(String privateSPVersion) {
productInfo.setSPVersion(privateSPVersion);
return this;
}
public Builder setTcpPort(String privateTcpPort) {
productInfo.setTcpPort(privateTcpPort);
return this;
}
public Builder setJavaHome(String privateJavaHome) {
productInfo.setJavaHome(privateJavaHome);
return this;
}
public Builder setDotNetCoreHome(String privateDotNetCoreHome) {
productInfo.setDotNetCoreHome(privateDotNetCoreHome);
return this;
}
public NCacheInfo build() {
return new NCacheInfo(this);
}
public Builder setInstallType(String s) {
productInfo.setInstallType(s);
return this;
}
}
}