@@ -3663,6 +3663,37 @@ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCo
36633663 public SoftwareCompetition createSoftwareContest (TCSubject tcSubject , SoftwareCompetition contest ,
36643664 long tcDirectProjectId , Date regEndDate , Date multiRoundEndDate , Date endDate )
36653665 throws ContestServiceException , PermissionServiceException {
3666+ return createSoftwareContest (
3667+ tcSubject , contest , tcDirectProjectId , regEndDate , multiRoundEndDate , endDate , false );
3668+ }
3669+
3670+ /**
3671+ * <p>
3672+ * Creates a new <code>SoftwareCompetition</code> in the persistence.
3673+ * </p>
3674+ *
3675+ * @param tcSubject TCSubject instance contains the login security info
3676+ * for the current user
3677+ * @param contest the <code>SoftwareCompetition</code> to create as a
3678+ * contest
3679+ * @param tcDirectProjectId the TC direct project id. a <code>long</code>
3680+ * providing the ID of a client the new competition
3681+ * belongs to.
3682+ * @param regEndDate the registration end date
3683+ * @param multiRoundEndDate the end date for the multiround phase. No multiround
3684+ * if it's null.
3685+ * @param endDate the end date for submission phase. Can be null if to
3686+ * use default.
3687+ * @param skipForum true if no need to create the forum
3688+ *
3689+ * @return the created <code>SoftwareCompetition</code> as a contest
3690+ * @throws IllegalArgumentException if the input argument is invalid.
3691+ * @throws ContestServiceException if an error occurs when interacting with the
3692+ * service layer.
3693+ */
3694+ public SoftwareCompetition createSoftwareContest (TCSubject tcSubject , SoftwareCompetition contest ,
3695+ long tcDirectProjectId , Date regEndDate , Date multiRoundEndDate , Date endDate , boolean skipForum )
3696+ throws ContestServiceException , PermissionServiceException {
36663697 logger .debug ("createSoftwareContest with information : [tcSubject = " + tcSubject .getUserId ()
36673698 + ", tcDirectProjectId =" + tcDirectProjectId + ", multiRoundEndDate = " + multiRoundEndDate + "]" );
36683699
@@ -3715,7 +3746,7 @@ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCo
37153746 checkBillingProjectCCA (contest );
37163747
37173748 // update the AssetDTO and update corresponding properties
3718- createUpdateAssetDTO (tcSubject , contest );
3749+ createUpdateAssetDTO (tcSubject , contest , skipForum );
37193750
37203751 com .topcoder .management .resource .Resource [] contestResources = createContestResources (tcSubject , contest ,
37213752 billingProjectId , requireApproval );
@@ -4015,10 +4046,11 @@ private boolean shouldAutoCreateBugHuntContest(SoftwareCompetition contest) {
40154046 * @param tcSubject TCSubject instance contains the login security info for the
40164047 * current user
40174048 * @param contest the contest
4049+ * @param skipForum true if no need to create forum
40184050 * @throws EntityNotFoundException if any error occurs
40194051 * @throws com.topcoder.catalog.service.PersistenceException if any error occurs
40204052 */
4021- private void createUpdateAssetDTO (TCSubject tcSubject , SoftwareCompetition contest ) throws EntityNotFoundException ,
4053+ private void createUpdateAssetDTO (TCSubject tcSubject , SoftwareCompetition contest , boolean skipForum ) throws EntityNotFoundException ,
40224054 com .topcoder .catalog .service .PersistenceException , DAOException , ConfigManagerException {
40234055 // check if it is going to create development contest
40244056 boolean isDevContest = isDevContest (contest );
@@ -4055,7 +4087,7 @@ else if (isDevContest) {
40554087 }
40564088 long forumId = 0 ;
40574089 // create forum
4058- if (createForum ) {
4090+ if (createForum && ! skipForum ) {
40594091 if (useExistingAsset && assetDTO .getForum () != null ) {
40604092 forumId = assetDTO .getForum ().getJiveCategoryId ();
40614093 } else {
0 commit comments