deployRequest 디바이스 타입 삭제, 파일명 추가
This commit is contained in:
parent
b410e107e9
commit
8f906b5fb4
|
@ -50,9 +50,9 @@ class DefaultTubeService implements TubeService {
|
||||||
|
|
||||||
DeployRequest deployRequest = DeployRequest.builder()
|
DeployRequest deployRequest = DeployRequest.builder()
|
||||||
.assetCode(request.getAssetCode())
|
.assetCode(request.getAssetCode())
|
||||||
.deviceType("nodeq")
|
|
||||||
.appName(request.getSlotNumber())
|
.appName(request.getSlotNumber())
|
||||||
.commandType(CommandType.JSON)
|
.commandType(CommandType.JSON)
|
||||||
|
.name("") // TODO
|
||||||
.parameters(tubeMap)
|
.parameters(tubeMap)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
@ -83,9 +83,9 @@ class DefaultTubeService implements TubeService {
|
||||||
resultMap.forEach((assetCode, slot) -> slot.forEach((slotNumber, tube) -> {
|
resultMap.forEach((assetCode, slot) -> slot.forEach((slotNumber, tube) -> {
|
||||||
DeployRequest deployRequest = DeployRequest.builder()
|
DeployRequest deployRequest = DeployRequest.builder()
|
||||||
.assetCode(assetCode)
|
.assetCode(assetCode)
|
||||||
.deviceType("nodeq")
|
|
||||||
.appName(slotNumber)
|
.appName(slotNumber)
|
||||||
.commandType(CommandType.JSON)
|
.commandType(CommandType.JSON)
|
||||||
|
.name("") // TODO
|
||||||
.parameters(tube)
|
.parameters(tube)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,16 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public class DeployRequest {
|
public class DeployRequest {
|
||||||
private String assetCode;
|
private String assetCode;
|
||||||
private String deviceType;
|
|
||||||
private String appName;
|
private String appName;
|
||||||
private String commandType;
|
private String commandType;
|
||||||
// private String fileName; // TODO: deployer에 추가되면 추가
|
private String name;
|
||||||
private Map<String, String> parameters;
|
private Map<String, String> parameters;
|
||||||
|
|
||||||
public DeployRequest(String assetCode, String deviceType, String appName, String commandType, Map<String, String> parameters) {
|
public DeployRequest(String assetCode, String appName, String commandType, String name, Map<String, String> parameters) {
|
||||||
this.assetCode = assetCode;
|
this.assetCode = assetCode;
|
||||||
this.deviceType = deviceType;
|
|
||||||
this.appName = appName;
|
this.appName = appName;
|
||||||
this.commandType = commandType;
|
this.commandType = commandType;
|
||||||
|
this.name = name;
|
||||||
this.parameters = parameters;
|
this.parameters = parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +28,6 @@ public class DeployRequest {
|
||||||
return assetCode;
|
return assetCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDeviceType() {
|
|
||||||
return deviceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppName() {
|
public String getAppName() {
|
||||||
return appName;
|
return appName;
|
||||||
|
@ -41,6 +37,10 @@ public class DeployRequest {
|
||||||
return commandType;
|
return commandType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, String> getParameters() {
|
public Map<String, String> getParameters() {
|
||||||
return parameters;
|
return parameters;
|
||||||
}
|
}
|
||||||
|
@ -49,18 +49,18 @@ public class DeployRequest {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "DeployRequest{" +
|
return "DeployRequest{" +
|
||||||
"assetCode='" + assetCode + '\'' +
|
"assetCode='" + assetCode + '\'' +
|
||||||
", deviceType='" + deviceType + '\'' +
|
|
||||||
", appName='" + appName + '\'' +
|
", appName='" + appName + '\'' +
|
||||||
", commandType=" + commandType +
|
", commandType='" + commandType + '\'' +
|
||||||
|
", name='" + name + '\'' +
|
||||||
", parameters=" + parameters +
|
", parameters=" + parameters +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class Builder {
|
public static final class Builder {
|
||||||
private String assetCode;
|
private String assetCode;
|
||||||
private String deviceType;
|
|
||||||
private String appName;
|
private String appName;
|
||||||
private String commandType;
|
private String commandType;
|
||||||
|
private String name;
|
||||||
private Map<String, String> parameters;
|
private Map<String, String> parameters;
|
||||||
|
|
||||||
private Builder() {
|
private Builder() {
|
||||||
|
@ -71,11 +71,6 @@ public class DeployRequest {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder deviceType(String deviceType) {
|
|
||||||
this.deviceType = deviceType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder appName(String appName) {
|
public Builder appName(String appName) {
|
||||||
this.appName = appName;
|
this.appName = appName;
|
||||||
return this;
|
return this;
|
||||||
|
@ -86,13 +81,18 @@ public class DeployRequest {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder parameters(Map<String, String> parameters) {
|
public Builder parameters(Map<String, String> parameters) {
|
||||||
this.parameters = parameters;
|
this.parameters = parameters;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeployRequest build() {
|
public DeployRequest build() {
|
||||||
return new DeployRequest(assetCode, deviceType, appName, commandType, parameters);
|
return new DeployRequest(assetCode, appName, commandType, name, parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue