99 lines
2.6 KiB
Java
99 lines
2.6 KiB
Java
package inc.sdt.controlcentermanagement.domain;
|
|
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* @author sunae.jang (sa.jang@sdt.inc)
|
|
*/
|
|
public class DeployRequest {
|
|
private String assetCode;
|
|
private String deviceType;
|
|
private String appName;
|
|
private String commandType;
|
|
// private String fileName; // TODO: deployer에 추가되면 추가
|
|
private Map<String, String> parameters;
|
|
|
|
public DeployRequest(String assetCode, String deviceType, String appName, String commandType, Map<String, String> parameters) {
|
|
this.assetCode = assetCode;
|
|
this.deviceType = deviceType;
|
|
this.appName = appName;
|
|
this.commandType = commandType;
|
|
this.parameters = parameters;
|
|
}
|
|
|
|
public static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
public String getAssetCode() {
|
|
return assetCode;
|
|
}
|
|
|
|
public String getDeviceType() {
|
|
return deviceType;
|
|
}
|
|
|
|
public String getAppName() {
|
|
return appName;
|
|
}
|
|
|
|
public String getCommandType() {
|
|
return commandType;
|
|
}
|
|
|
|
public Map<String, String> getParameters() {
|
|
return parameters;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "DeployRequest{" +
|
|
"assetCode='" + assetCode + '\'' +
|
|
", deviceType='" + deviceType + '\'' +
|
|
", appName='" + appName + '\'' +
|
|
", commandType=" + commandType +
|
|
", parameters=" + parameters +
|
|
'}';
|
|
}
|
|
|
|
public static final class Builder {
|
|
private String assetCode;
|
|
private String deviceType;
|
|
private String appName;
|
|
private String commandType;
|
|
private Map<String, String> parameters;
|
|
|
|
private Builder() {
|
|
}
|
|
|
|
public Builder assetCode(String assetCode) {
|
|
this.assetCode = assetCode;
|
|
return this;
|
|
}
|
|
|
|
public Builder deviceType(String deviceType) {
|
|
this.deviceType = deviceType;
|
|
return this;
|
|
}
|
|
|
|
public Builder appName(String appName) {
|
|
this.appName = appName;
|
|
return this;
|
|
}
|
|
|
|
public Builder commandType(CommandType commandType) {
|
|
this.commandType = commandType.toString().toLowerCase();
|
|
return this;
|
|
}
|
|
|
|
public Builder parameters(Map<String, String> parameters) {
|
|
this.parameters = parameters;
|
|
return this;
|
|
}
|
|
|
|
public DeployRequest build() {
|
|
return new DeployRequest(assetCode, deviceType, appName, commandType, parameters);
|
|
}
|
|
}
|
|
}
|