Skip to content

Commit

Permalink
Fixed issue on PATCH application environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
vertigo17 committed Nov 27, 2024
1 parent 403d283 commit 3652093
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ public class ApplicationDTOV001 {
@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
private String bugTrackerNewUrl;

@ApiModelProperty(position = 11)
@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
private String bugTrackerConnector;

@ApiModelProperty(position = 11)
@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
private String bugTrackerParam1;

@ApiModelProperty(position = 11)
@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
private String bugTrackerParam2;

@ApiModelProperty(position = 11)
@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
private String bugTrackerParam3;

@ApiModelProperty(position = 9)
@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
private Integer poolSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
public interface ApplicationMapperV001 {

@Mapping(source = "environmentList", target = "environments")
@Mapping(source = "repoUrl", target = "svnurl")
ApplicationDTOV001 toDTO(Application application);

@InheritInverseConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,62 +59,74 @@ public class CountryEnvironmentParametersDTOV001 {

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 4)
private String endPoint;
private boolean isActive;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 5)
private String contextRoot;
private String endPoint;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 6)
private String urlLogin;
private String contextRoot;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 7)
private String domain;
private String urlLogin;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 8)
private String var1;
private String domain;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 9)
private String var2;
private String var1;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 10)
private String var3;
private String var2;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 11)
private String var4;
private String var3;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 12)
private int poolSize;
private String var4;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 13)
private String mobileActivity;
private String secret1;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 14)
private String secret2;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 15)
private int poolSize;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 16)
private String mobileActivity;

@JsonView(value = {View.Public.GET.class, View.Public.PATCH.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 17)
private String mobilePackage;

@JsonView(value = {View.Public.GET.class})
@ApiModelProperty(example = "cerberus", position = 15)
@ApiModelProperty(example = "cerberus", position = 18)
private String usrCreated;

@JsonView(value = {View.Public.GET.class})
@ApiModelProperty(example = "2012-06-19 09:56:40.0", position = 16)
@ApiModelProperty(example = "2012-06-19 09:56:40.0", position = 19)
private String dateCreated;

@JsonView(value = {View.Public.GET.class})
@ApiModelProperty(example = "cerberus", position = 17)
@ApiModelProperty(example = "cerberus", position = 20)
private String usrModif;

@JsonView(value = {View.Public.GET.class})
@ApiModelProperty(example = "2019-04-06 10:15:09.0", position = 18)
@ApiModelProperty(example = "2019-04-06 10:15:09.0", position = 21)
private String dateModif;

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ public interface CountryEnvironmentParametersMapperV001 {

@Mapping(source = "ip", target = "endPoint")
@Mapping(source = "url", target = "contextRoot")
@Mapping(target = "isActive", ignore = true)
CountryEnvironmentParametersDTOV001 toDTO(CountryEnvironmentParameters countryEnvironmentParameters);

@InheritInverseConfiguration
@Mapping(target = "isActive", ignore = true)
CountryEnvironmentParameters toEntity(CountryEnvironmentParametersDTOV001 countryEnvironmentParametersDTO);
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,11 @@ public interface AppServiceMapperV001 {
@Mapping(target = "responseNb", ignore = true)
@Mapping(target = "bodyType", ignore = true)
@Mapping(target = "simulationParameters", ignore = true)
@Mapping(target = "authType", ignore = true)
@Mapping(target = "authUser", ignore = true)
@Mapping(target = "authPassword", ignore = true)
@Mapping(target = "authAddTo", ignore = true)
@Mapping(target = "start", ignore = true)
@Mapping(target = "end", ignore = true)
AppService toEntity(AppServiceDTOV001 appServiceDTO);
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public class TestcaseCountryPropertiesDTOV001 {
@ApiModelProperty(position = 7)
private String value2;

@JsonView(value = {View.Public.GET.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 7)
private String value3;

@JsonView(value = {View.Public.GET.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 8)
private String length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public class TestcaseDepDTOV001 {
@ApiModelProperty(position = 3)
private String dependencyEvent;

@JsonView(value = {View.Public.GET.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 3)
private Integer dependencyTCDelay;

@NotNull(message = "Type is mandatory")
@JsonView(value = {View.Public.GET.class, View.Public.PUT.class, View.Public.POST.class})
@ApiModelProperty(position = 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public interface TestcaseDepMapperV001 {

@Mapping(source = "dependencyTestFolderId", target = "dependencyTest")
@Mapping(source = "dependencyTestcaseId", target = "dependencyTestcase")
@Mapping(source = "active", target = "isActive")
@Mapping(target = "test", ignore = true)
@Mapping(target = "testcase", ignore = true)
@Mapping(target = "testcaseDescription", ignore = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@ public interface TestcaseMapperV001 {
@Mapping(target = "lastExecutionStatus", ignore = true)
@Mapping(target = "testCaseCountries", ignore = true)
@Mapping(target = "testCaseLabels", ignore = true)
@Mapping(target = "refOrigineUrl", ignore = true)
TestCase toEntity(TestcaseDTOV001 testcaseDTO);
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public CountryEnvironmentParameters updateApplicationEnvironmentPATCH(String sys
newApplicationEnvironment.setVar3(newApplicationEnvironment.getVar3() == null ? cep.getItem().getVar3() : newApplicationEnvironment.getVar3());
newApplicationEnvironment.setVar4(newApplicationEnvironment.getVar4() == null ? cep.getItem().getVar4() : newApplicationEnvironment.getVar4());

newApplicationEnvironment.setSecret1(newApplicationEnvironment.getSecret1()== null ? cep.getItem().getSecret1(): newApplicationEnvironment.getSecret1());
newApplicationEnvironment.setSecret2(newApplicationEnvironment.getSecret2()== null ? cep.getItem().getSecret2(): newApplicationEnvironment.getSecret2());

newApplicationEnvironment.setIp(newApplicationEnvironment.getIp() == null ? cep.getItem().getIp() : newApplicationEnvironment.getIp());
newApplicationEnvironment.setDomain(newApplicationEnvironment.getDomain() == null ? cep.getItem().getDomain() : newApplicationEnvironment.getDomain());
newApplicationEnvironment.setUrl(newApplicationEnvironment.getUrl() == null ? cep.getItem().getUrl() : newApplicationEnvironment.getUrl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public class TestCase {
private String type;
private String origine;
private String refOrigine;
private String refOrigineUrl;
private String comment;
private String fromMajor;
private String fromMinor;
Expand All @@ -92,6 +91,8 @@ public class TestCase {
* Not included in table.
*/
@EqualsAndHashCode.Exclude
private String refOrigineUrl;
@EqualsAndHashCode.Exclude
private String system;
@EqualsAndHashCode.Exclude
private String lastExecutionStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,16 @@ protected void processRequest(HttpServletRequest request, HttpServletResponse re
returnFile(request, response, tceFile, pathString);
break;
case "TXT":
if (autoContentType) {
response.setContentType("application/txt");
}
response.setHeader("Content-Disposition", "filename=" + filenameDownload);
returnFile(request, response, tceFile, pathString);
break;
case "PDF":
if (autoContentType) {
response.setContentType("application/pdf");
}
response.setHeader("Content-Disposition", "filename=" + filenameDownload);
returnPDF(request, response, tceFile, pathString);
break;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
In case you need to generate a random String

=== Generate random String with any alpha numeric characters
== Generate random String with any alpha numeric characters

* 1 - Define a Random property

Expand All @@ -15,7 +15,7 @@ image:property_text_random.png[Logo]

image:property_text_random_action.png[Logo]

=== Generate random String with specific alpha numeric characters
== Generate random String with specific alpha numeric characters

* 1 - Define a Random property

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
You may have to use same step implementation with different data on different context (country for exemple). Or re-use the same step on other testcase (See how to add a Step in Library)

=== Generate static String
== Generate static String

* 1 - Define a Static property

Expand Down

0 comments on commit 3652093

Please sign in to comment.