Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion build-master-targets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@
<path>
<fileset dir="${webdir}">
<include name="**/*.css"/>
<exclude name="**/scorecard/"/>
</fileset>
</path>
</foreach>
Expand Down
47 changes: 5 additions & 42 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@
<property name="design_dist.jar" value="${distfilename}_${component_version}_design_dist.jar"/>
<property name="jboss_deploy_dir" value="${jboss.home}/server/${server.name}/deploy" />

<!-- SCORECARD WAR -->
<property name="scorecard_dir" value="${basedir}/scorecard_tool"/>
<property name="scorecard_conf" value="${scorecard_dir}/grails-app/conf"/>
<property name="scorecardtargetdir" value="${basedir}/target"/>
<property name="scorecard.war" value="${build_distdir}/scorecard.war" />

<!-- DOCUMENT PACKAGE -->
<property name="dist_docpackage" value="${builddir}/doc_package"/>
<property name="docpackage.jar" value="${distfilename}_docs.jar"/>
Expand Down Expand Up @@ -112,11 +106,6 @@
</copy>
<replace replacefilterfile="token.properties" dir="${tokenized_conf}"/>
</target>

<target name="init-scorecard" description="update the configurations with tokens for scorecard" >
<copy file="${scorecard_dir}/DataSource.groovy.properties" tofile="${scorecard_conf}/DataSource.groovy" overwrite="true"/>
<replace replacefilterfile="token.properties" dir="${scorecard_dir}/grails-app/conf"/>
</target>

<target name="compile" description="compile the source code">
<mkdir dir="${build_classdir}"/>
Expand Down Expand Up @@ -148,7 +137,7 @@
<property name="temp_dist_ear" value="${build_distdir}/temp_dist_ear"/>
<property name="ear_shared_libdir" value="${build_distdir}/lib"/>

<target name="ear" depends="war, scorecard_war" description="create the ear tarball for direct application">
<target name="ear" depends="war" description="create the ear tarball for direct application">
<!-- Copy the libraries -->
<mkdir dir="${build_distdir}"/>
<mkdir dir="${build_distdir}/lib"/>
Expand Down Expand Up @@ -386,15 +375,13 @@
<zip destfile="direct-static.jar">
<fileset dir="${srcdir}/web">
<include name="css/direct/**/*.css"/>
<include name="css/scorecard/**/*.css"/>
<exclude name="scripts/tiny_mce/**/*.*"/>
<include name="scripts/*.*"/>
<include name="scripts/launch/**/*.*"/>
<include name="scripts/copilot/**/*.*"/>
<include name="scripts/my/**/*.*"/>
<include name="scripts/scorecard/**/*.*"/>
<include name="scripts/tinyMCE/templates/*.html"/>
<include name="scripts/ckeditor/templates/**/*.*"/>
<include name="scripts/ckeditor/**/*.*"/>
</fileset>
</zip>
</target>
Expand All @@ -403,14 +390,12 @@
<zip destfile="direct-static-all.jar">
<fileset dir="${srcdir}/web">
<include name="css/direct/**/*.css"/>
<include name="css/scorecard/**/*.css"/>
<exclude name="scripts/tiny_mce/**/*.*"/>
<include name="scripts/*.*"/>
<include name="scripts/launch/**/*.*"/>
<include name="scripts/copilot/**/*.*"/>
<include name="scripts/scorecard/**/*.*"/>
<include name="scripts/copilot/**/*.*"/>
<include name="scripts/tinyMCE/templates/*.html"/>
<include name="scripts/ckeditor/templates/**/*.*"/>
<include name="scripts/ckeditor/**/*.*"/>
<include name="images/*.*"/>
<include name="images/copilotPosting/*.*"/>
<include name="images/edit/*.*"/>
Expand Down Expand Up @@ -685,28 +670,6 @@
</then>
</if>
</target>

<!-- =================================
target: scorecard
================================= -->
<target name="scorecard_war" depends="init-scorecard" description="--> Creates a WAR of a Grails application">
<ant antfile="build.xml" target="war" dir="${scorecard_dir}" inheritall="false">
<propertyset>
<propertyref builtin="commandline"/>
</propertyset>
</ant>
<unzip src="${scorecard_dir}/scorecard.war" dest="${scorecard.war}"/>
<delete file="${scorecard_dir}/scorecard.war"/>
</target>

<target name="scorecard_clean" description="--> Clean all files of a Grails application">
<ant antfile="build.xml" target="clean" dir="${scorecard_dir}" inheritall="false">
<propertyset>
<propertyref builtin="commandline"/>
</propertyset>
</ant>
<delete dir="${scorecardtargetdir}"/>
</target>

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

</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006 - 2014 TopCoder Inc., All Rights Reserved.
* Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.management.project;

Expand Down Expand Up @@ -74,16 +74,22 @@
* <li>Added property {@link #autoAssignReviewerId}</li>
* </ul>
* </p>
*
*
* <p>
* Version 1.10 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES):
* <ul>
* <li>Added {@link #groups}</li>
* </ul>
* </p>
* <p>
* This class implements Serializable interface to support serialization.
* </p>
* <p>
* Thread safety: This class is not thread safe.
* </p>
*
* @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin
* @version 1.9
* @author tuenm, iamajia, duxiaoyang, bugbuka, GreatKevin, TCSCODER
* @version 1.10
* @since 1.0
*/
@XmlType(name = "project", namespace = "com.topcoder.management.project")
Expand Down Expand Up @@ -280,6 +286,13 @@ public long getIterativeReviewScorecardId() {
*/
private List<CopilotContestExtraInfo> copilotContestExtraInfos;

/**
* Represents list of groups of the challenge
*
* @since 1.10
*/
private List<ProjectGroup> groups;

/**
* <p>
* Create a new Project instance with the given project type and project
Expand Down Expand Up @@ -843,4 +856,33 @@ public String getCreator() {
public void setCreator(String creator) {
this.creator = creator;
}

/**
* Getter for {@link #groups}
*
* @return groups
* @since 1.10
*/
public List<ProjectGroup> getGroups() {
if (groups == null) {
groups = new ArrayList<ProjectGroup>();
}
return groups;
}

/**
* Setter for {@link #groups}
*
* @param groups list of ProjectGroup
* @since 1.10
*/
public void setGroups(List<ProjectGroup> groups) {
if (groups != null) {
if (groups.contains(null)) {
throw new IllegalArgumentException("The project groups can not contain null.");
}
}

this.groups = groups;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright (C) 2017 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.management.project;

import java.io.Serializable;

/**
* <p>
* This is a ProjectGroup entity which represents the project_group_lu.
* </p>
*
* <p>
* Thread safety: This class is not thread safe.
* </p>
*
* @author TCSCODER
* @version 1.0
*/
public class ProjectGroup implements Serializable {
/**
* Represents group id
*/
private long id;

/**
* Represents group name
*/
private String name;

/**
* Constructor
*/
public ProjectGroup() {
}

/**
* Constructor
*
* @param id group id
* @param name group name
*/
public ProjectGroup(long id, String name) {
this.id = id;
this.name = name;
}

/**
* Getter for {@link #id}
* @return id
*/
public long getId() {
return id;
}

/**
* Setter for {@link #id}
* @param id the group id
*/
public void setId(long id) {
this.id = id;
}

/**
* Getter for {@link #name}
* @return name
*/
public String getName() {
return name;
}

/**
* Setter for {@link #name}
* @param name the name of group
*/
public void setName(String name) {
this.name = name;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved.
* Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.management.project;

Expand Down Expand Up @@ -106,12 +106,19 @@
* </p>
*
* <p>
* Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES):
* <ul>
* <li>Added {@link #getAllProjectGroups()}</li>
* </ul>
* </p>
*
* <p>
* Thread safety: The implementations of this interface do not have to be thread
* safe.
* </p>
*
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin
* @version 1.5
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER
* @version 1.6
*/
public interface ProjectManager {
/**
Expand Down Expand Up @@ -1140,4 +1147,13 @@ public void saveSoftwareCheckpointSubmissionsGeneralFeedback(long contestId, Str
* @since 1.2.5
*/
public boolean[] requireBillingProjectsCCA(long[] billingProjectIds) throws PersistenceException;

/**
* Get all project groups
*
* @return array of all project group
* @throws PersistenceException if any database related exception occur
* @since 1.6
*/
public ProjectGroup[] getAllProjectGroups() throws PersistenceException;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006 - 2013 TopCoder Inc., All Rights Reserved.
* Copyright (C) 2006 - 2017 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.management.project;

Expand Down Expand Up @@ -122,15 +122,22 @@
* <li>Added method {@link #getAllProjectPlatforms()}</li>
* </ul>
* </p>
*
*
* <p>
* Version 1.6 (TOPCODER - SUPPORT GROUPS CONCEPT FOR CHALLENGES):
* <ul>
* <li>Added {@link #getAllProjectGroups()}</li>
* </ul>
* </p>
*
* <p>
* Thread Safety: The implementation is not thread safe in that two threads
* running the same method will use the same statement and could overwrite each
* other's work.
* </p>
*
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin
* @version 1.5
* @author tuenm, iamajia, pulky, murphydog, bugbuka, GreatKevin, TCSCODER
* @version 1.6
*/
public class ProjectManagerImpl implements ProjectManager {
/**
Expand Down Expand Up @@ -1615,4 +1622,15 @@ public boolean[] requireBillingProjectsCCA(long[] billingProjectIds) throws Pers

return requiredCCAs;
}

/**
* Get all project groups
*
* @return array of all project group
* @throws PersistenceException if any database related exception occur
* @since 1.6
*/
public ProjectGroup[] getAllProjectGroups() throws PersistenceException {
return persistence.getAllProjectGroups();
}
}
Loading