Skip to content

Commit a38914f

Browse files
committed
add noArg construct to response model
1 parent 9ca6fa1 commit a38914f

File tree

15 files changed

+51
-14
lines changed

15 files changed

+51
-14
lines changed

deliverable-management/src/main/java/com/topcoder/management/deliverable/Deliverable.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* @version 1.0.2
2121
*/
2222
public class Deliverable extends NamedDeliverableStructure {
23+
public Deliverable() {
24+
}
2325
/**
2426
* <p>
2527
* The serial version id.
@@ -31,19 +33,19 @@ public class Deliverable extends NamedDeliverableStructure {
3133
* The identifier of the project the Deliverable is associated with. This field is set in the
3234
* constructor and is immutable. This field must always be greater than 0.
3335
*/
34-
private final long project;
36+
private long project;
3537

3638
/**
3739
* The identifier of the phase the Deliverable is associated with. This field is set in the
3840
* constructor and is immutable. This field must always be greater than 0.
3941
*/
40-
private final long phase;
42+
private long phase;
4143

4244
/**
4345
* The identifier of the resource the Deliverable is associated with. This field is set in the
4446
* constructor and is immutable. This field must always be greater than 0.
4547
*/
46-
private final long resource;
48+
private long resource;
4749

4850
/**
4951
* The identifier of the submission that is associated with the deliverable. This field is set
@@ -57,7 +59,7 @@ public class Deliverable extends NamedDeliverableStructure {
5759
* Tells whether the deliverable is required to be completed for the project phase to end. This
5860
* field is set in the constructor.
5961
*/
60-
private final boolean required;
62+
private boolean required;
6163

6264
/**
6365
* The date on which the deliverable was completed. If the deliverable has not been completed,

project-management/src/main/java/com/topcoder/management/project/Project.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
@SuppressWarnings("serial")
3535
public class Project extends AuditableObject implements Serializable {
3636

37+
public Project() {
38+
}
3739
/**
3840
* Represents the id of this instance. Only values greater than or equal to zero is allowed. This variable is
3941
* initialized in the constructor and can be accessed in the corresponding getter/setter method.
@@ -407,4 +409,8 @@ public String getTcDirectProjectName() {
407409
public void setTcDirectProjectName(String tcDirectProjectName) {
408410
this.tcDirectProjectName = tcDirectProjectName;
409411
}
412+
413+
public void setAllProperties(Map properties) {
414+
this.properties = properties;
415+
}
410416
}

project-management/src/main/java/com/topcoder/management/project/ProjectCategory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
*/
2323
@SuppressWarnings("serial")
2424
public class ProjectCategory implements Serializable {
25+
public ProjectCategory() {
26+
}
2527
/**
2628
* Represents Web Page Design project category.
2729
*

project-management/src/main/java/com/topcoder/management/project/ProjectStatus.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
@SuppressWarnings("serial")
2222
public class ProjectStatus implements Serializable {
2323

24+
public ProjectStatus() {
25+
}
2426
/**
2527
* Represents the id of this instance. Only values greater than zero is allowed. This variable is initialized in the
2628
* constructor and can be accessed in the corresponding getter/setter method.

project-management/src/main/java/com/topcoder/management/project/ProjectType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
*/
3030
@SuppressWarnings("serial")
3131
public class ProjectType implements Serializable {
32+
public ProjectType() {
33+
}
3234
/**
3335
* Represents Studio project type.
3436
*

project-phases/src/main/java/com/topcoder/project/phases/Phase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
* @version 2.0.3
4949
*/
5050
public class Phase extends AttributableObject {
51+
public Phase() {
52+
}
5153
/**
5254
* Represents the milliseconds value of one minute.
5355
*/
@@ -62,7 +64,7 @@ public class Phase extends AttributableObject {
6264
* Represents the project instance this phase belong to, it is initialized in the constructor and never changed
6365
* afterward.
6466
*/
65-
private final Project project;
67+
private Project project;
6668

6769
/**
6870
* Represents the length of the phase in milliseconds, it will be initialized in the constructor, and set in the

tc-online-review-api/src/main/java/com/topcoder/onlinereview/component/deliverable/Deliverable.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ public class Deliverable extends NamedDeliverableStructure {
3131
* The identifier of the project the Deliverable is associated with. This field is set in the
3232
* constructor and is immutable. This field must always be greater than 0.
3333
*/
34-
private final long project;
34+
private long project;
3535

3636
/**
3737
* The identifier of the phase the Deliverable is associated with. This field is set in the
3838
* constructor and is immutable. This field must always be greater than 0.
3939
*/
40-
private final long phase;
40+
private long phase;
4141

4242
/**
4343
* The identifier of the resource the Deliverable is associated with. This field is set in the
4444
* constructor and is immutable. This field must always be greater than 0.
4545
*/
46-
private final long resource;
46+
private long resource;
4747

4848
/**
4949
* The identifier of the submission that is associated with the deliverable. This field is set
@@ -57,7 +57,7 @@ public class Deliverable extends NamedDeliverableStructure {
5757
* Tells whether the deliverable is required to be completed for the project phase to end. This
5858
* field is set in the constructor.
5959
*/
60-
private final boolean required;
60+
private boolean required;
6161

6262
/**
6363
* The date on which the deliverable was completed. If the deliverable has not been completed,
@@ -66,6 +66,9 @@ public class Deliverable extends NamedDeliverableStructure {
6666
*/
6767
private Date completionDate = null;
6868

69+
public Deliverable() {
70+
}
71+
6972
/**
7073
* Creates a new Deliverable. Sets all fields to the given values.
7174
*

tc-online-review-api/src/main/java/com/topcoder/onlinereview/component/project/management/Project.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public class Project extends AuditableObject implements Serializable {
9797
*/
9898
private String tcDirectProjectName;
9999

100+
public Project() {
101+
}
102+
100103
/**
101104
* <p>
102105
* Create a new Project instance with the given project type and project status. These fields are required for a
@@ -406,4 +409,8 @@ public String getTcDirectProjectName() {
406409
public void setTcDirectProjectName(String tcDirectProjectName) {
407410
this.tcDirectProjectName = tcDirectProjectName;
408411
}
412+
413+
public void setAllProperties(Map properties) {
414+
this.properties = properties;
415+
}
409416
}

tc-online-review-api/src/main/java/com/topcoder/onlinereview/component/project/management/ProjectCategory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ public class ProjectCategory implements Serializable {
133133
*/
134134
private ProjectType projectType = null;
135135

136+
public ProjectCategory() {
137+
}
138+
136139
/**
137140
* Create a new ProjectCategory instance with the given id and name. The two fields are required for a this instance
138141
* to be persisted.

tc-online-review-api/src/main/java/com/topcoder/onlinereview/component/project/management/ProjectPersistence.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ public ProjectType[] getAllProjectTypes() {
20732073
// create the ProjectType array.
20742074
ProjectType[] projectTypes = new ProjectType[result.size()];
20752075
for (int i = 0; i < result.size(); ++i) {
2076-
var row = result.get(0);
2076+
var row = result.get(i);
20772077
// create a new instance of ProjectType class
20782078
projectTypes[i] =
20792079
new ProjectType(

tc-online-review-api/src/main/java/com/topcoder/onlinereview/component/project/management/ProjectType.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ public class ProjectType implements Serializable {
7070
*/
7171
private boolean generic = false;
7272

73+
public ProjectType() {
74+
}
7375
/**
7476
* Create a new ProjectType instance with the given id and name. The two fields are required for a this instance to
7577
* be persisted.

tc-online-review-api/src/main/java/com/topcoder/onlinereview/component/project/phase/Phase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class Phase extends AttributableObject {
6262
* Represents the project instance this phase belong to, it is initialized in the constructor and never changed
6363
* afterward.
6464
*/
65-
private final Project project;
65+
private Project project;
6666

6767
/**
6868
* Represents the length of the phase in milliseconds, it will be initialized in the constructor, and set in the
@@ -138,6 +138,8 @@ public class Phase extends AttributableObject {
138138
*/
139139
private Date modifyDate;
140140

141+
public Phase() {
142+
}
141143
/**
142144
* Create a new instance of Phase with the project this phase belong to, and length in milliseconds of this phase.
143145
* Phase will be add to the project automatically.

tc-online-review-api/src/main/java/com/topcoder/onlinereview/controller/ProjectController.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ public class ProjectController {
1414

1515
@GetMapping("projects")
1616
public ListProjectResponse listProjects(
17-
@RequestParam(required = false, defaultValue = "1") String stid) throws BaseException {
18-
return listProjectService.listProjects(1, "my", 132456L, "Global Manager");
17+
@RequestParam Integer activeTab,
18+
@RequestParam String scope,
19+
@RequestParam Long userId,
20+
@RequestParam String role)
21+
throws BaseException {
22+
return listProjectService.listProjects(activeTab, scope, userId, role);
1923
}
2024
}

tc-online-review-api/src/main/java/com/topcoder/onlinereview/service/ListProjectService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ public ListProjectResponse listProjects(Integer activeTab, String scope, long us
193193

194194
// Get this project's Root Catalog ID
195195
String rootCatalogId = (String) ungroupedProject.getProperty("Root Catalog ID");
196-
197196
Phase[] activePhases = null;
198197

199198
// Calculate end date of the project and get all active phases (if any)

tc-online-review-api/src/main/resources/application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
server.port=9999
12
spring.ids-datasource.jdbc-url=jdbc:informix-sqli://localhost:2021/tcs_catalog:INFORMIXSERVER=informixoltp_tcp;IFX_USE_STRENC=true
23
spring.ids-datasource.driver-class-name=com.informix.jdbc.IfxDriver
34
spring.ids-datasource.username=informix

0 commit comments

Comments
 (0)