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

Commit bce1998

Browse files
authored
Merge pull request #268 from appirio-tech/dev
Group support scorecard tool removal
2 parents 38f37f8 + 76fc847 commit bce1998

File tree

386 files changed

+2648
-77998
lines changed

Some content is hidden

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

386 files changed

+2648
-77998
lines changed

build-master-targets.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,6 @@
567567
<path>
568568
<fileset dir="${webdir}">
569569
<include name="**/*.css"/>
570-
<exclude name="**/scorecard/"/>
571570
</fileset>
572571
</path>
573572
</foreach>

build.xml

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@
7979
<property name="design_dist.jar" value="${distfilename}_${component_version}_design_dist.jar"/>
8080
<property name="jboss_deploy_dir" value="${jboss.home}/server/${server.name}/deploy" />
8181

82-
<!-- SCORECARD WAR -->
83-
<property name="scorecard_dir" value="${basedir}/scorecard_tool"/>
84-
<property name="scorecard_conf" value="${scorecard_dir}/grails-app/conf"/>
85-
<property name="scorecardtargetdir" value="${basedir}/target"/>
86-
<property name="scorecard.war" value="${build_distdir}/scorecard.war" />
87-
8882
<!-- DOCUMENT PACKAGE -->
8983
<property name="dist_docpackage" value="${builddir}/doc_package"/>
9084
<property name="docpackage.jar" value="${distfilename}_docs.jar"/>
@@ -112,11 +106,6 @@
112106
</copy>
113107
<replace replacefilterfile="token.properties" dir="${tokenized_conf}"/>
114108
</target>
115-
116-
<target name="init-scorecard" description="update the configurations with tokens for scorecard" >
117-
<copy file="${scorecard_dir}/DataSource.groovy.properties" tofile="${scorecard_conf}/DataSource.groovy" overwrite="true"/>
118-
<replace replacefilterfile="token.properties" dir="${scorecard_dir}/grails-app/conf"/>
119-
</target>
120109

121110
<target name="compile" description="compile the source code">
122111
<mkdir dir="${build_classdir}"/>
@@ -148,7 +137,7 @@
148137
<property name="temp_dist_ear" value="${build_distdir}/temp_dist_ear"/>
149138
<property name="ear_shared_libdir" value="${build_distdir}/lib"/>
150139

151-
<target name="ear" depends="war, scorecard_war" description="create the ear tarball for direct application">
140+
<target name="ear" depends="war" description="create the ear tarball for direct application">
152141
<!-- Copy the libraries -->
153142
<mkdir dir="${build_distdir}"/>
154143
<mkdir dir="${build_distdir}/lib"/>
@@ -386,15 +375,13 @@
386375
<zip destfile="direct-static.jar">
387376
<fileset dir="${srcdir}/web">
388377
<include name="css/direct/**/*.css"/>
389-
<include name="css/scorecard/**/*.css"/>
390378
<exclude name="scripts/tiny_mce/**/*.*"/>
391379
<include name="scripts/*.*"/>
392380
<include name="scripts/launch/**/*.*"/>
393381
<include name="scripts/copilot/**/*.*"/>
394382
<include name="scripts/my/**/*.*"/>
395-
<include name="scripts/scorecard/**/*.*"/>
396383
<include name="scripts/tinyMCE/templates/*.html"/>
397-
<include name="scripts/ckeditor/templates/**/*.*"/>
384+
<include name="scripts/ckeditor/**/*.*"/>
398385
</fileset>
399386
</zip>
400387
</target>
@@ -403,14 +390,12 @@
403390
<zip destfile="direct-static-all.jar">
404391
<fileset dir="${srcdir}/web">
405392
<include name="css/direct/**/*.css"/>
406-
<include name="css/scorecard/**/*.css"/>
407393
<exclude name="scripts/tiny_mce/**/*.*"/>
408394
<include name="scripts/*.*"/>
409395
<include name="scripts/launch/**/*.*"/>
410-
<include name="scripts/copilot/**/*.*"/>
411-
<include name="scripts/scorecard/**/*.*"/>
396+
<include name="scripts/copilot/**/*.*"/>
412397
<include name="scripts/tinyMCE/templates/*.html"/>
413-
<include name="scripts/ckeditor/templates/**/*.*"/>
398+
<include name="scripts/ckeditor/**/*.*"/>
414399
<include name="images/*.*"/>
415400
<include name="images/copilotPosting/*.*"/>
416401
<include name="images/edit/*.*"/>
@@ -685,28 +670,6 @@
685670
</then>
686671
</if>
687672
</target>
688-
689-
<!-- =================================
690-
target: scorecard
691-
================================= -->
692-
<target name="scorecard_war" depends="init-scorecard" description="--> Creates a WAR of a Grails application">
693-
<ant antfile="build.xml" target="war" dir="${scorecard_dir}" inheritall="false">
694-
<propertyset>
695-
<propertyref builtin="commandline"/>
696-
</propertyset>
697-
</ant>
698-
<unzip src="${scorecard_dir}/scorecard.war" dest="${scorecard.war}"/>
699-
<delete file="${scorecard_dir}/scorecard.war"/>
700-
</target>
701-
702-
<target name="scorecard_clean" description="--> Clean all files of a Grails application">
703-
<ant antfile="build.xml" target="clean" dir="${scorecard_dir}" inheritall="false">
704-
<propertyset>
705-
<propertyref builtin="commandline"/>
706-
</propertyset>
707-
</ant>
708-
<delete dir="${scorecardtargetdir}"/>
709-
</target>
710673

711674
<!-- ************************************************************************** -->
712675
<!-- ************ END DEPLOYMENT RELATED TARGETS *************************** -->
@@ -716,4 +679,4 @@
716679
some of the targets of this build file. -->
717680
<import file="${basedir}/build-override.xml" optional="true"/>
718681

719-
</project>
682+
</project>

components/project_management/src/java/main/com/topcoder/management/project/Project.java

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2006 - 2014 TopCoder Inc., All Rights Reserved.
2+
* Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved.
33
*/
44
package com.topcoder.management.project;
55

@@ -74,16 +74,22 @@
7474
* <li>Added property {@link #autoAssignReviewerId}</li>
7575
* </ul>
7676
* </p>
77-
*
77+
*
78+
* <p>
79+
* Version 1.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES):
80+
* <ul>
81+
* <li>Added {@link #groups}</li>
82+
* </ul>
83+
* </p>
7884
* <p>
7985
* This class implements Serializable interface to support serialization.
8086
* </p>
8187
* <p>
8288
* Thread safety: This class is not thread safe.
8389
* </p>
8490
*
85-
* @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin
86-
* @version 1.9
91+
* @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin, TCSCODER
92+
* @version 1.10
8793
* @since 1.0
8894
*/
8995
@XmlType(name = "project", namespace = "com.topcoder.management.project")
@@ -280,6 +286,13 @@ public long getIterativeReviewScorecardId() {
280286
*/
281287
private List<CopilotContestExtraInfo> copilotContestExtraInfos;
282288

289+
/**
290+
* Represents list of groups of the challenge
291+
*
292+
* @since 1.10
293+
*/
294+
private List<ProjectGroup> groups;
295+
283296
/**
284297
* <p>
285298
* Create a new Project instance with the given project type and project
@@ -843,4 +856,33 @@ public String getCreator() {
843856
public void setCreator(String creator) {
844857
this.creator = creator;
845858
}
859+
860+
/**
861+
* Getter for {@link #groups}
862+
*
863+
* @return groups
864+
* @since 1.10
865+
*/
866+
public List<ProjectGroup> getGroups() {
867+
if (groups == null) {
868+
groups = new ArrayList<ProjectGroup>();
869+
}
870+
return groups;
871+
}
872+
873+
/**
874+
* Setter for {@link #groups}
875+
*
876+
* @param groups list of ProjectGroup
877+
* @since 1.10
878+
*/
879+
public void setGroups(List<ProjectGroup> groups) {
880+
if (groups != null) {
881+
if (groups.contains(null)) {
882+
throw new IllegalArgumentException("The project groups can not contain null.");
883+
}
884+
}
885+
886+
this.groups = groups;
887+
}
846888
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (C) 2017 TopCoder Inc., All Rights Reserved.
3+
*/
4+
package com.topcoder.management.project;
5+
6+
import java.io.Serializable;
7+
8+
/**
9+
* <p>
10+
* This is a ProjectGroup entity which represents the project_group_lu.
11+
* </p>
12+
*
13+
* <p>
14+
* Thread safety: This class is not thread safe.
15+
* </p>
16+
*
17+
* @author TCSCODER
18+
* @version 1.0
19+
*/
20+
public class ProjectGroup implements Serializable {
21+
/**
22+
* Represents group id
23+
*/
24+
private long id;
25+
26+
/**
27+
* Represents group name
28+
*/
29+
private String name;
30+
31+
/**
32+
* Constructor
33+
*/
34+
public ProjectGroup() {
35+
}
36+
37+
/**
38+
* Constructor
39+
*
40+
* @param id group id
41+
* @param name group name
42+
*/
43+
public ProjectGroup(long id, String name) {
44+
this.id = id;
45+
this.name = name;
46+
}
47+
48+
/**
49+
* Getter for {@link #id}
50+
* @return id
51+
*/
52+
public long getId() {
53+
return id;
54+
}
55+
56+
/**
57+
* Setter for {@link #id}
58+
* @param id the group id
59+
*/
60+
public void setId(long id) {
61+
this.id = id;
62+
}
63+
64+
/**
65+
* Getter for {@link #name}
66+
* @return name
67+
*/
68+
public String getName() {
69+
return name;
70+
}
71+
72+
/**
73+
* Setter for {@link #name}
74+
* @param name the name of group
75+
*/
76+
public void setName(String name) {
77+
this.name = name;
78+
}
79+
}

components/project_management/src/java/main/com/topcoder/management/project/ProjectManager.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved.
2+
* Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved.
33
*/
44
package com.topcoder.management.project;
55

@@ -106,12 +106,19 @@
106106
* </p>
107107
*
108108
* <p>
109+
* Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES):
110+
* <ul>
111+
* <li>Added {@link #getAllProjectGroups()}</li>
112+
* </ul>
113+
* </p>
114+
*
115+
* <p>
109116
* Thread safety: The implementations of this interface do not have to be thread
110117
* safe.
111118
* </p>
112119
*
113-
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin
114-
* @version 1.5
120+
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER
121+
* @version 1.6
115122
*/
116123
public interface ProjectManager {
117124
/**
@@ -1140,4 +1147,13 @@ public void saveSoftwareCheckpointSubmissionsGeneralFeedback(long contestId, Str
11401147
* @since 1.2.5
11411148
*/
11421149
public boolean[] requireBillingProjectsCCA(long[] billingProjectIds) throws PersistenceException;
1150+
1151+
/**
1152+
* Get all project groups
1153+
*
1154+
* @return array of all project group
1155+
* @throws PersistenceException if any database related exception occur
1156+
* @since 1.6
1157+
*/
1158+
public ProjectGroup[] getAllProjectGroups() throws PersistenceException;
11431159
}

components/project_management/src/java/main/com/topcoder/management/project/ProjectManagerImpl.java

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved.
2+
* Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved.
33
*/
44
package com.topcoder.management.project;
55

@@ -122,15 +122,22 @@
122122
* <li>Added method {@link #getAllProjectPlatforms()}</li>
123123
* </ul>
124124
* </p>
125-
*
125+
*
126+
* <p>
127+
* Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES):
128+
* <ul>
129+
* <li>Added {@link #getAllProjectGroups()}</li>
130+
* </ul>
131+
* </p>
132+
*
126133
* <p>
127134
* Thread Safety: The implementation is not thread safe in that two threads
128135
* running the same method will use the same statement and could overwrite each
129136
* other's work.
130137
* </p>
131138
*
132-
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin
133-
* @version 1.5
139+
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER
140+
* @version 1.6
134141
*/
135142
public class ProjectManagerImpl implements ProjectManager {
136143
/**
@@ -1615,4 +1622,15 @@ public boolean[] requireBillingProjectsCCA(long[] billingProjectIds) throws Pers
16151622

16161623
return requiredCCAs;
16171624
}
1625+
1626+
/**
1627+
* Get all project groups
1628+
*
1629+
* @return array of all project group
1630+
* @throws PersistenceException if any database related exception occur
1631+
* @since 1.6
1632+
*/
1633+
public ProjectGroup[] getAllProjectGroups() throws PersistenceException {
1634+
return persistence.getAllProjectGroups();
1635+
}
16181636
}

0 commit comments

Comments
 (0)