Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 48f7d80

Browse files
authored
Merge pull request #162 from appirio-tech/dev
Tasks v1 and Review Scorecard Selection. Also removes ASP features.
2 parents 4cb3d8a + 7dd5c83 commit 48f7d80

File tree

72 files changed

+7604
-8429
lines changed

Some content is hidden

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

72 files changed

+7604
-8429
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ In this configuration, we'll run the direct app in a docker container locally bu
2323
2. Set the following environment variables:
2424
* TC_DEV_NAT_DIR : Local directory containing the pem file for accessing the dev NAT instance (used to create a tunnel to the dev informix instances)
2525
* TC_DIRECT_SRC_HOME : Local directory for the root direct-app directory
26-
* ASP_API_URL : Base URL for the ASP API (e.g., https://api.topcoder-dev.com)
2726
3. Run `docker-compose up` from the `docker` subdirectory containing the `docker-compose.yml` file
2827

2928

build-dependencies.xml

-7
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,6 @@
474474
<!-- slf4j -->
475475
<property name="slf4j.jar" value="${ext_libdir}/mime-util/slf4j-api-1.5.11.jar"/>
476476

477-
<property name="asp-client.jar" value="${ext_libdir}/aspclient/asp-client.jar"/>
478-
479477

480478
<!-- EJB/Persistence libraries -->
481479
<path id="ejb.libs">
@@ -626,10 +624,6 @@
626624
<pathelement location="${scorecard_management.jar}"/>
627625
</path>
628626

629-
<path id="aspclient.libs">
630-
<fileset dir="${ext_libdir}/aspclient" includes="*.jar"/>
631-
</path>
632-
633627
<path id="component.3rdParty-dependencies">
634628
<path refid="struts.libs"/>
635629
<path refid="spring.libs"/>
@@ -661,7 +655,6 @@
661655
<pathelement location="${cxf.jar}"/>
662656
-->
663657
<pathelement location="${java-jwt-1.0.0.jar}"/>
664-
<pathelement location="${asp-client.jar}"/>
665658
</path>
666659

667660
</project>

build.xml

-6
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,6 @@
294294
<!--
295295
<copy file="${jsr311.jar}" todir="${ear_shared_libdir}" overwrite="true"/>
296296
<copy file="${cxf.jar}" todir="${ear_shared_libdir}" overwrite="true"/>
297-
-->
298-
<copy file="${asp-client.jar}" todir="${ear_shared_libdir}" overwrite="true"/>
299-
<copy todir="${ear_shared_libdir}" overwrite="true">
300-
<fileset dir="${ext_libdir}/aspclient" includes="*.jar"/>
301-
</copy>
302-
<!--
303297
<copy file="${aopalliance-1.0.jar}" todir="${ear_shared_libdir}" overwrite="true"/>
304298
<copy file="${geronimo-jaxws_2.2_spec-1.1.jar}" todir="${ear_shared_libdir}" overwrite="true"/>
305299
<copy file="${geronimo-annotation_1.0_spec-1.1.1.jar}" todir="${ear_shared_libdir}" overwrite="true"/>

components/online_review_upload_services/src/java/main/com/cronos/onlinereview/services/uploads/UploadExternalServices.java

+34-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import javax.activation.DataHandler;
1010
import java.rmi.RemoteException;
11+
import java.util.Set;
1112

1213
/**
1314
* <p>
@@ -20,11 +21,17 @@
2021
* </p>
2122
*
2223
* <p>
24+
* Version 1.1.3 (TOPCODER DIRECT - IMPROVEMENT FOR PRE-REGISTER MEMBERS WHEN LAUNCHING CHALLENGES):
25+
* <ol>
26+
* <li>Added {@link #removeSubmitters(long, Set, String)} method</li>
27+
* </ol>
28+
* </p>
29+
* <p>
2330
* Thread safety: the implementations must be thread safe.
2431
* </p>
2532
*
2633
* @author fabrizyo, saarixx, cyberjag, TCSDEVELOPER
27-
* @version 1.1
34+
* @version 1.1.3
2835
* @since 1.0
2936
*/
3037
public interface UploadExternalServices {
@@ -204,4 +211,30 @@ long addSubmitter(long projectId, long userId)
204211
* @since 1.1.1
205212
*/
206213
Resource addPrimaryScreener(long projectId, long userId) throws UploadServicesException, PhaseManagementException;
214+
215+
/**
216+
* Remove all submitters for a given project
217+
*
218+
* @param projectId the project id
219+
* @param operator user whos added
220+
* @return
221+
* @throws InvalidProjectException
222+
* @throws UploadServicesException
223+
* @throws InvalidUserException
224+
* @throws InvalidProjectPhaseException
225+
* @since 1.1.2
226+
*/
227+
Set<Long> removeAllSubmitters(long projectId, String operator) throws UploadServicesException;
228+
229+
/**
230+
* Remove submitters from given project
231+
*
232+
* @param projectId the project id
233+
* @param users set of user id
234+
* @param operator user who is added it
235+
* @return
236+
* @throws UploadServicesException
237+
* @since 1.1.3
238+
*/
239+
Set<Long> removeSubmitters(long projectId, Set<Long> users, String operator)throws UploadServicesException;
207240
}

components/online_review_upload_services/src/java/main/com/cronos/onlinereview/services/uploads/UploadServices.java

+51-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
/*
2-
* Copyright (C) 2007-2010 TopCoder Inc., All Rights Reserved.
2+
* Copyright (C) 2007-2016 TopCoder Inc., All Rights Reserved.
33
*/
44
package com.cronos.onlinereview.services.uploads;
55

66
import com.topcoder.management.phase.PhaseManagementException;
77
import com.topcoder.management.resource.Resource;
88

9+
import java.util.Set;
10+
911

1012
/**
1113
* <p>
@@ -27,8 +29,20 @@
2729
* Thread safety: the implementations must be thread safe.
2830
* </p>
2931
*
32+
* <p>
33+
* Version 1.1.2 (Provide Way To Pre_register members When Launching Challenge)
34+
* <ol>
35+
* <li>Added {@link #removeAllSubmitters(long, String)} method</li>
36+
* </ol>
37+
* </p>
38+
* <p>
39+
* Version 1.1.3 (TOPCODER DIRECT - IMPROVEMENT FOR PRE-REGISTER MEMBERS WHEN LAUNCHING CHALLENGES):
40+
* <ol>
41+
* <li>Added {@link #removeSubmitters(long, Set, String)} method</li>
42+
* </ol>
43+
* </p>
3044
* @author fabrizyo, saarixx, cyberjag, TCSDEVELOPER
31-
* @version 1.1.1
45+
* @version 1.1.3
3246
* @since 1.0
3347
*/
3448
public interface UploadServices {
@@ -37,7 +51,7 @@ public interface UploadServices {
3751
* <p>
3852
* Adds a new submission for an user in a particular project.
3953
* </p>
40-
*
54+
* <p/>
4155
* <p>
4256
* If the project allows multiple submissions for users, it will add the new submission and return. If multiple
4357
* submission are not allowed for the project firstly, it will add the new submission, secondly mark previous
@@ -47,9 +61,7 @@ public interface UploadServices {
4761
* @param projectId the project's id
4862
* @param userId the user's id
4963
* @param filename the file name to use
50-
*
5164
* @return the id of the new submission
52-
*
5365
* @throws InvalidProjectException if the project does not exist
5466
* @throws InvalidProjectPhaseException if neither Submission or Screening phase are opened
5567
* @throws InvalidUserException if the user does not exist or has not the submitter role
@@ -69,9 +81,7 @@ public interface UploadServices {
6981
* @param projectId the project's id
7082
* @param userId the user's id
7183
* @param filename the file name to use
72-
*
7384
* @return the id of the created final fix submission.
74-
*
7585
* @throws InvalidProjectException if the project does not exist
7686
* @throws InvalidProjectPhaseException if Final Fix phase is not opened
7787
* @throws InvalidUserException if the user does not exist or she/he is not winner submitter
@@ -91,9 +101,7 @@ public interface UploadServices {
91101
* @param projectId the project's id
92102
* @param userId the user's id
93103
* @param filename the file name to use
94-
*
95104
* @return the id of the created test cases submission
96-
*
97105
* @throws InvalidProjectException if the project does not exist
98106
* @throws InvalidProjectPhaseException if Review phase is not opened
99107
* @throws InvalidUserException if the user does not exist or has not the reviewer role
@@ -110,9 +118,7 @@ public interface UploadServices {
110118
* @param projectId the project's id
111119
* @param userId the user's id.
112120
* @param filename the file name to use.
113-
*
114121
* @return the id of the new submission.
115-
*
116122
* @throws InvalidProjectException if the project doesn't exist.
117123
* @throws InvalidProjectPhaseException if Specification Submission phase is not opened.
118124
* @throws InvalidUserException if the user doesn't exist or hasn't the Specification Submitter role.
@@ -131,26 +137,22 @@ public interface UploadServices {
131137
* @param submissionId the submission's id
132138
* @param submissionStatusId the submission status id
133139
* @param operator the operator which execute the operation
134-
*
135-
* @throws InvalidSubmissionException if the submission does not exist
136-
* @throws InvalidSubmissionStatusException
137-
* if the submission status does not exist
138-
* @throws PersistenceException if some error occurs in persistence layer
139-
* @throws IllegalArgumentException if any id is &lt; 0 or if operator is null or trim to empty
140+
* @throws InvalidSubmissionException if the submission does not exist
141+
* @throws InvalidSubmissionStatusException if the submission status does not exist
142+
* @throws PersistenceException if some error occurs in persistence layer
143+
* @throws IllegalArgumentException if any id is &lt; 0 or if operator is null or trim to empty
140144
* @since 1.0
141145
*/
142146
void setSubmissionStatus(long submissionId, long submissionStatusId, String operator)
143-
throws InvalidSubmissionException, InvalidSubmissionStatusException, PersistenceException;
147+
throws InvalidSubmissionException, InvalidSubmissionStatusException, PersistenceException;
144148

145149

146150
/**
147151
* Adds the given user as a new submitter to the given project id.
148152
*
149153
* @param projectId the project to which the user needs to be added
150154
* @param userId the user to be added
151-
*
152155
* @return the added resource id
153-
*
154156
* @throws InvalidProjectException if the project id is unknown
155157
* @throws InvalidUserException if the user id is unknown
156158
* @throws InvalidProjectPhaseException if the phase of the project is not Registration.
@@ -171,7 +173,7 @@ long addSubmitter(long projectId, long userId) throws InvalidProjectException,
171173
* @throws InvalidUserException if the user id is unknown
172174
* @throws InvalidProjectPhaseException if the phase of the project is not Registration.
173175
* @throws UploadServicesException if any error occurs from UploadServices
174-
* @throws PhaseManagementException if an unexpected error occurs.
176+
* @throws PhaseManagementException if an unexpected error occurs.
175177
* @throws IllegalArgumentException if any id is &lt; 0
176178
* @since 1.1.1
177179
*/
@@ -187,9 +189,35 @@ long addSubmitter(long projectId, long userId) throws InvalidProjectException,
187189
* @throws InvalidUserException if the user id is unknown
188190
* @throws InvalidProjectPhaseException if the phase of the project is not Registration.
189191
* @throws UploadServicesException if any error occurs from UploadServices
190-
* @throws PhaseManagementException if an unexpected error occurs.
192+
* @throws PhaseManagementException if an unexpected error occurs.
191193
* @throws IllegalArgumentException if any id is &lt; 0
192194
* @since 1.1.1
193195
*/
194196
Resource addPrimaryScreener(long projectId, long userId) throws UploadServicesException, PhaseManagementException;
195-
}
197+
198+
/**
199+
* Remove all submitters for a given project
200+
*
201+
* @param projectId the project id
202+
* @param operator user whos added
203+
* @return
204+
* @throws InvalidProjectException
205+
* @throws UploadServicesException
206+
* @throws InvalidUserException
207+
* @throws InvalidProjectPhaseException
208+
* @since 1.1.2
209+
*/
210+
Set<Long> removeAllSubmitters(long projectId, String operator) throws UploadServicesException;
211+
212+
/**
213+
* Remove submitters from given project
214+
*
215+
* @param projectId the project id
216+
* @param users set of user id
217+
* @param operator user who is added it
218+
* @return
219+
* @throws UploadServicesException
220+
* @since 1.1.3
221+
*/
222+
Set<Long> removeSubmitters(long projectId, Set<Long> users, String operator)throws UploadServicesException;
223+
}

components/online_review_upload_services/src/java/main/com/cronos/onlinereview/services/uploads/impl/DefaultUploadExternalServices.java

+50-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2007-2010 TopCoder Inc., All Rights Reserved.
2+
* Copyright (C) 2007-2016 TopCoder Inc., All Rights Reserved.
33
*/
44
package com.cronos.onlinereview.services.uploads.impl;
55

@@ -29,6 +29,7 @@
2929
import java.io.InputStream;
3030
import java.rmi.RemoteException;
3131
import java.text.MessageFormat;
32+
import java.util.Set;
3233

3334
/**
3435
* <p>
@@ -68,12 +69,19 @@
6869
* </ol>
6970
* </p>
7071
* <p>
72+
*
73+
* <p>
74+
* Version 1.1.3 (TOPCODER DIRECT - IMPROVEMENT FOR PRE-REGISTER MEMBERS WHEN LAUNCHING CHALLENGES):
75+
* <ul>
76+
* <li>Added {@link #removeSubmitters(long, Set, String)} method</li>
77+
* </ul>
78+
* </p>
7179
* Thread safe: The thread safety is completely relied to the uploadServices implementation because it's impossible
7280
* to change the other variables
7381
* </p>
7482
*
7583
* @author fabrizyo, saarixx, cyberjag, TCSDEVELOPER
76-
* @version 1.1.1
84+
* @version 1.1.3
7785
* @since 1.0
7886
*/
7987
public class DefaultUploadExternalServices implements UploadExternalServices {
@@ -574,4 +582,44 @@ private static void close(Closeable closeable) {
574582
// ignores exception
575583
}
576584
}
585+
586+
/**
587+
* Remove all submitters for a given project
588+
*
589+
* @param projectId the project id
590+
* @param operator user whos added
591+
* @return
592+
* @throws InvalidProjectException
593+
* @throws UploadServicesException
594+
* @throws InvalidUserException
595+
* @throws InvalidProjectPhaseException
596+
* @since 1.1.2
597+
*/
598+
public Set<Long> removeAllSubmitters(long projectId, String operator) throws UploadServicesException{
599+
Helper.logFormat(LOG, Level.DEBUG, "Entered DefaultUploadExternalServices#removeAllSubmitters(long, string)");
600+
try {
601+
return uploadServices.removeAllSubmitters(projectId, operator);
602+
} finally {
603+
Helper.logFormat(LOG, Level.DEBUG, "Exited DefaultUploadExternalServices#removeAllSubmitters(long, string)");
604+
}
605+
}
606+
607+
/**
608+
* Remove submitters from given project
609+
*
610+
* @param projectId the project id
611+
* @param users set of user id
612+
* @param operator user who is added it
613+
* @return
614+
* @throws UploadServicesException
615+
* @since 1.1.3
616+
*/
617+
public Set<Long> removeSubmitters(long projectId, Set<Long> users, String operator) throws UploadServicesException {
618+
Helper.logFormat(LOG, Level.DEBUG, "Entered DefaultUploadExternalServices#removeSubmitters(long, Set, string)");
619+
try{
620+
return uploadServices.removeSubmitters(projectId, users, operator);
621+
}finally {
622+
Helper.logFormat(LOG, Level.DEBUG, "Exited DefaultUploadExternalServices#removeSubmitters(long, Set, string)");
623+
}
624+
}
577625
}

0 commit comments

Comments
 (0)