Skip to content

Commit 4166085

Browse files
authored
Merge pull request #137 from xxcxy/dev-maven
remove checkThrottle
2 parents 711cd9f + 5b3a8b2 commit 4166085

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+44
-348
lines changed

src/main/java/com/cronos/onlinereview/actions/latedeliverables/EditLateDeliverableAction.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ public EditLateDeliverableAction() {
4545
public String execute() throws BaseException {
4646
LoggingHelper.logAction(request);
4747

48-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
49-
if (!verification.isSuccessful()) {
50-
return verification.getResult();
51-
}
52-
5348
// check user login
5449
if (!AuthorizationHelper.isUserLoggedIn(request)) {
5550
AuthorizationHelper.setLoginRedirect(request, false);

src/main/java/com/cronos/onlinereview/actions/latedeliverables/SaveLateDeliverableAction.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ public SaveLateDeliverableAction() {
7878
public String execute() throws Exception {
7979
LoggingHelper.logAction(request);
8080

81-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
82-
if (!verification.isSuccessful()) {
83-
return verification.getResult();
84-
}
85-
8681
// check user login
8782
if (!AuthorizationHelper.isUserLoggedIn(request)) {
8883
AuthorizationHelper.setLoginRedirect(request, false);

src/main/java/com/cronos/onlinereview/actions/latedeliverables/ViewLateDeliverablesAction.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ public ViewLateDeliverablesAction() {
157157
public String execute() throws BaseException {
158158
LoggingHelper.logAction(request);
159159

160-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
161-
if (!verification.isSuccessful()) {
162-
return verification.getResult();
163-
}
164-
165160
// check user login
166161
if (!AuthorizationHelper.isUserLoggedIn(request)) {
167162
// set url for login redirect.

src/main/java/com/cronos/onlinereview/actions/project/EditProjectAction.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,8 @@ public class EditProjectAction extends BaseProjectAction {
6161
public String execute() throws BaseException {
6262
LoggingHelper.logAction(request);
6363

64-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
65-
66-
if (!verification.isSuccessful()) {
67-
return verification.getResult();
68-
}
69-
7064
// Verify that certain requirements are met before processing with the Action
71-
verification = ActionsHelper.checkForCorrectProjectId(this, request,
65+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(this, request,
7266
Constants.EDIT_PROJECT_DETAILS_PERM_NAME, false);
7367

7468
// If any error has occurred, return action forward contained in the result bean

src/main/java/com/cronos/onlinereview/actions/project/ListProjectsAction.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ public String execute() throws BaseException {
9696

9797
LoggingHelper.logAction(request);
9898

99-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(true, request, this);
100-
101-
if (!verification.isSuccessful()) {
102-
return verification.getResult();
103-
}
104-
10599
// Gather the roles the user has for current request
106100
AuthorizationHelper.gatherUserRoles(request);
107101

src/main/java/com/cronos/onlinereview/actions/project/NewProjectAction.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ public class NewProjectAction extends BaseProjectAction {
4242
public String execute() throws BaseException {
4343
LoggingHelper.logAction(request);
4444

45-
// Call the ActionsHelper.checkThrottle using new parameters
46-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
47-
48-
if (!verification.isSuccessful()) {
49-
return verification.getResult();
50-
}
51-
5245
// Gather the roles the user has for current request
5346
AuthorizationHelper.gatherUserRoles(request);
5447

src/main/java/com/cronos/onlinereview/actions/project/SaveProjectAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,12 @@ public class SaveProjectAction extends BaseProjectAction {
206206
public String execute() throws BaseException {
207207
LoggingHelper.logAction(request);
208208

209-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
210-
if (!verification.isSuccessful()) {
211-
return verification.getResult();
212-
}
213-
214209
// Check whether user is creating new project or editing existing one
215210
final boolean newProject = (getModel().get("pid") == null);
216211
Project project = null;
217212

218213
// Check if the user has the permission to perform this action
219-
verification = null;
214+
CorrectnessCheckResult verification = null;
220215
if (newProject) {
221216
// Gather the roles the user has for current request
222217
AuthorizationHelper.gatherUserRoles(request);

src/main/java/com/cronos/onlinereview/actions/projectdetails/AdvanceFailedScreeningSubmissionAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,8 @@ public AdvanceFailedScreeningSubmissionAction() {
6262
public String execute() throws BaseException {
6363
LoggingHelper.logAction(request);
6464

65-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
66-
if (!verification.isSuccessful()) {
67-
return verification.getResult();
68-
}
69-
7065
// Verify that certain requirements are met before processing with the Action
71-
verification = checkForCorrectUploadId(request, Constants.ADVANCE_SUBMISSION_FAILED_SCREENING_PERM_NAME);
66+
CorrectnessCheckResult verification = checkForCorrectUploadId(request, Constants.ADVANCE_SUBMISSION_FAILED_SCREENING_PERM_NAME);
7267
// If any error has occurred, return action forward contained in the result bean
7368
if (!verification.isSuccessful()) {
7469
return verification.getResult();

src/main/java/com/cronos/onlinereview/actions/projectdetails/BaseProjectDetailsAction.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,8 @@ protected String handleDownloadSubmission(HttpServletRequest request, HttpServle
378378
long submissionType) throws BaseException, IOException {
379379
LoggingHelper.logAction(request);
380380

381-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
382-
if (!verification.isSuccessful()) {
383-
return verification.getResult();
384-
}
385-
386381
// Verify that certain requirements are met before processing with the Action
387-
verification = checkForCorrectUploadId(request, errorMessageKey);
382+
CorrectnessCheckResult verification = checkForCorrectUploadId(request, errorMessageKey);
388383
// If any error has occurred, return action forward contained in the result bean
389384
if (!verification.isSuccessful()) {
390385
return verification.getResult();
@@ -616,16 +611,11 @@ protected String handleUploadSubmission(DynamicModel uploadSubmissionForm, HttpS
616611
String submissionTypeName, String submitPermissionName, String phaseName) throws BaseException {
617612
LoggingHelper.logAction(request);
618613

619-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
620-
if (!verification.isSuccessful()) {
621-
return verification.getResult();
622-
}
623-
624614
// Determine if this request is a post back
625615
final boolean postBack = (request.getParameter("postBack") != null);
626616

627617
// Verify that certain requirements are met before processing with the Action
628-
verification = ActionsHelper.checkForCorrectProjectId(this, request, submitPermissionName, postBack);
618+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(this, request, submitPermissionName, postBack);
629619
// If any error has occurred, return action forward contained in the result bean
630620
if (!verification.isSuccessful()) {
631621
return verification.getResult();

src/main/java/com/cronos/onlinereview/actions/projectdetails/ContactManagerAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,11 @@ public ContactManagerAction() {
6969
public String execute() throws BaseException, ConfigManagerException {
7070
LoggingHelper.logAction(request);
7171

72-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
73-
if (!verification.isSuccessful()) {
74-
return verification.getResult();
75-
}
76-
7772
// Determine if this request is a post back
7873
boolean postBack = (request.getParameter("postBack") != null);
7974

8075
// Verify that certain requirements are met before processing with the Action
81-
verification = ActionsHelper.checkForCorrectProjectId(
76+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(
8277
this, request, Constants.CONTACT_PM_PERM_NAME, postBack);
8378
// If any error has occurred, return action forward contained in the result bean
8479
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectdetails/DownloadDocumentAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@ public DownloadDocumentAction() {
5252
public String execute() throws BaseException, IOException {
5353
LoggingHelper.logAction(request);
5454

55-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
56-
if (!verification.isSuccessful()) {
57-
return verification.getResult();
58-
}
59-
6055
// Verify that certain requirements are met before processing with the Action
61-
verification = checkForCorrectUploadId(request, Constants.DOWNLOAD_DOCUMENT_PERM_NAME);
56+
CorrectnessCheckResult verification = checkForCorrectUploadId(request, Constants.DOWNLOAD_DOCUMENT_PERM_NAME);
6257
// If any error has occurred, return action forward contained in the result bean
6358
if (!verification.isSuccessful()) {
6459
return verification.getResult();

src/main/java/com/cronos/onlinereview/actions/projectdetails/DownloadFinalFixAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ public DownloadFinalFixAction() {
5555
public String execute() throws BaseException, IOException {
5656
LoggingHelper.logAction(request);
5757

58-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
59-
if (!verification.isSuccessful()) {
60-
return verification.getResult();
61-
}
62-
6358
// Verify that certain requirements are met before processing with the Action
64-
verification = checkForCorrectUploadId(request, Constants.DOWNLOAD_FINAL_FIX_PERM_NAME);
59+
CorrectnessCheckResult verification = checkForCorrectUploadId(request, Constants.DOWNLOAD_FINAL_FIX_PERM_NAME);
6560
// If any error has occurred, return action forward contained in the result bean
6661
if (!verification.isSuccessful()) {
6762
return verification.getResult();

src/main/java/com/cronos/onlinereview/actions/projectdetails/DownloadSpecificationSubmissionAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,8 @@ public DownloadSpecificationSubmissionAction() {
4949
public String execute() throws BaseException, IOException {
5050
LoggingHelper.logAction(request);
5151

52-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
53-
if (!verification.isSuccessful()) {
54-
return verification.getResult();
55-
}
56-
5752
// Verify that certain requirements are met before processing with the Action
58-
verification = checkForCorrectUploadId(request, "ViewSubmission");
53+
CorrectnessCheckResult verification = checkForCorrectUploadId(request, "ViewSubmission");
5954
if (!verification.isSuccessful()) {
6055
return verification.getResult();
6156
}

src/main/java/com/cronos/onlinereview/actions/projectdetails/DownloadTestCaseAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@ public DownloadTestCaseAction() {
5252
public String execute() throws BaseException, IOException {
5353
LoggingHelper.logAction(request);
5454

55-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
56-
if (!verification.isSuccessful()) {
57-
return verification.getResult();
58-
}
59-
6055
// Verify that certain requirements are met before processing with the Action
61-
verification = checkForCorrectUploadId(request, Constants.DOWNLOAD_TEST_CASES_PERM_NAME);
56+
CorrectnessCheckResult verification = checkForCorrectUploadId(request, Constants.DOWNLOAD_TEST_CASES_PERM_NAME);
6257
// If any error has occurred, return action forward contained in the result bean
6358
if (!verification.isSuccessful()) {
6459
return verification.getResult();

src/main/java/com/cronos/onlinereview/actions/projectdetails/EarlyAppealsAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ public EarlyAppealsAction() {
5555
public String execute() throws BaseException {
5656
LoggingHelper.logAction(request);
5757

58-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
59-
if (!verification.isSuccessful()) {
60-
return verification.getResult();
61-
}
62-
6358
// Verify that certain requirements are met before processing with the Action
64-
verification = ActionsHelper.checkForCorrectProjectId(
59+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(
6560
this, request, Constants.VIEW_PROJECT_DETAIL_PERM_NAME, false);
6661
// If any error has occurred, return action forward contained in the result bean
6762
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectdetails/UnregisterAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,8 @@ public UnregisterAction() {
5454
public String execute() throws BaseException {
5555
LoggingHelper.logAction(request);
5656

57-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
58-
if (!verification.isSuccessful()) {
59-
return verification.getResult();
60-
}
61-
6257
// Verify that certain requirements are met before processing with the Action
63-
verification = ActionsHelper.checkForCorrectProjectId(
58+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(
6459
this, request, Constants.VIEW_PROJECT_DETAIL_PERM_NAME, false);
6560
// If any error has occurred, return action forward contained in the result bean
6661
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectdetails/UploadFinalFixAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,11 @@ public UploadFinalFixAction() {
6161
public String execute() throws BaseException {
6262
LoggingHelper.logAction(request);
6363

64-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
65-
if (!verification.isSuccessful()) {
66-
return verification.getResult();
67-
}
68-
6964
// Determine if this request is a post back
7065
boolean postBack = (request.getParameter("postBack") != null);
7166

7267
// Verify that certain requirements are met before processing with the Action
73-
verification = ActionsHelper.checkForCorrectProjectId(
68+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(
7469
this, request, Constants.PERFORM_FINAL_FIX_PERM_NAME, postBack);
7570
// If any error has occurred, return action forward contained in the result bean
7671
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectdetails/UploadSpecificationSubmissionAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,11 @@ public UploadSpecificationSubmissionAction() {
6666
public String execute() throws BaseException {
6767
LoggingHelper.logAction(request);
6868

69-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
70-
if (!verification.isSuccessful()) {
71-
return verification.getResult();
72-
}
73-
7469
// Determine if this request is a post back
7570
final boolean postBack = (request.getParameter("postBack") != null);
7671

7772
// Verify that certain requirements are met before processing with the Action
78-
verification = ActionsHelper.checkForCorrectProjectId(
73+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(
7974
this, request, Constants.PERFORM_SPECIFICATION_SUBMISSION_PERM_NAME,
8075
postBack);
8176

src/main/java/com/cronos/onlinereview/actions/projectdetails/UploadTestCaseAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,11 @@ public UploadTestCaseAction() {
6767
public String execute() throws BaseException {
6868
LoggingHelper.logAction(request);
6969

70-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
71-
if (!verification.isSuccessful()) {
72-
return verification.getResult();
73-
}
74-
7570
// Determine if this request is a post back
7671
boolean postBack = (request.getParameter("postBack") != null);
7772

7873
// Verify that certain requirements are met before processing with the Action
79-
verification = ActionsHelper.checkForCorrectProjectId(
74+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(
8075
this, request, Constants.UPLOAD_TEST_CASES_PERM_NAME, postBack);
8176
// If any error has occurred, return action forward contained in the result bean
8277
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectdetails/ViewProjectDetailsAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,8 @@ public ViewProjectDetailsAction() {
101101
public String execute() throws BaseException {
102102
LoggingHelper.logAction(request);
103103

104-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
105-
if (!verification.isSuccessful()) {
106-
return verification.getResult();
107-
}
108-
109104
// Verify that certain requirements are met before processing with the Action
110-
verification = ActionsHelper.checkForCorrectProjectId(this, request, Constants.VIEW_PROJECT_DETAIL_PERM_NAME,
105+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(this, request, Constants.VIEW_PROJECT_DETAIL_PERM_NAME,
111106
false);
112107
// If any error has occurred, return action forward contained in the result bean
113108
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectlinks/EditProjectLinksAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ public EditProjectLinksAction() {
6060
public String execute() throws BaseException {
6161
LoggingHelper.logAction(request);
6262

63-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
64-
if (!verification.isSuccessful()) {
65-
return verification.getResult();
66-
}
67-
6863
// Verify that certain requirements are met before processing with the Action
69-
verification = ActionsHelper.checkForCorrectProjectId(this,
64+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(this,
7065
request, Constants.EDIT_PROJECT_DETAILS_PERM_NAME, false);
7166
// If any error has occurred, return action forward contained in the result bean
7267
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectlinks/SaveProjectLinksAction.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,8 @@ public SaveProjectLinksAction() {
6060
public String execute() throws BaseException {
6161
LoggingHelper.logAction(request);
6262

63-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false, request, this);
64-
if (!verification.isSuccessful()) {
65-
return verification.getResult();
66-
}
67-
6863
// Verify that certain requirements are met before processing with the Action
69-
verification = ActionsHelper.checkForCorrectProjectId(this,
64+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(this,
7065
request, Constants.EDIT_PROJECT_DETAILS_PERM_NAME, false);
7166
// If any error has occurred, return action forward contained in the result bean
7267
if (!verification.isSuccessful()) {

src/main/java/com/cronos/onlinereview/actions/projectmanagementconsole/EditReviewFeedbackAction.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ public EditReviewFeedbackAction() {
5555
public String execute() throws BaseException {
5656
LoggingHelper.logAction(request);
5757

58-
CorrectnessCheckResult verification = ActionsHelper.checkThrottle(false,
59-
request, this);
60-
if (!verification.isSuccessful()) {
61-
return verification.getResult();
62-
}
63-
6458
request.setAttribute("activeTabIdx", 3);
6559
request.setAttribute("toEdit", Boolean.TRUE);
6660

@@ -69,7 +63,7 @@ public String execute() throws BaseException {
6963

7064
// Check whether the user has the permission to perform this action. Also check that current user is granted a
7165
// permission to access the details for requested project
72-
verification = ActionsHelper.checkForCorrectProjectId(this, request,
66+
CorrectnessCheckResult verification = ActionsHelper.checkForCorrectProjectId(this, request,
7367
Constants.VIEW_PROJECT_MANAGEMENT_CONSOLE_PERM_NAME, false);
7468

7569
if (!verification.isSuccessful()) {

0 commit comments

Comments
 (0)