Skip to content

add list projects #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: dev-restapi
Choose a base branch
from
Open
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
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* @version 1.0.2
*/
public class Deliverable extends NamedDeliverableStructure {
public Deliverable() {
}
/**
* <p>
* The serial version id.
Expand All @@ -31,19 +33,19 @@ public class Deliverable extends NamedDeliverableStructure {
* The identifier of the project the Deliverable is associated with. This field is set in the
* constructor and is immutable. This field must always be greater than 0.
*/
private final long project;
private long project;

/**
* The identifier of the phase the Deliverable is associated with. This field is set in the
* constructor and is immutable. This field must always be greater than 0.
*/
private final long phase;
private long phase;

/**
* The identifier of the resource the Deliverable is associated with. This field is set in the
* constructor and is immutable. This field must always be greater than 0.
*/
private final long resource;
private long resource;

/**
* The identifier of the submission that is associated with the deliverable. This field is set
Expand All @@ -57,7 +59,7 @@ public class Deliverable extends NamedDeliverableStructure {
* Tells whether the deliverable is required to be completed for the project phase to end. This
* field is set in the constructor.
*/
private final boolean required;
private boolean required;

/**
* The date on which the deliverable was completed. If the deliverable has not been completed,
Expand Down
6 changes: 6 additions & 0 deletions online-review-deliverables/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@
<scope>test</scope>
</dependency>
<dependency>
<<<<<<< Updated upstream
<groupId>com.ibm.informix</groupId>
<artifactId>jdbc</artifactId>
<version>4.50.7.1</version>
=======
<groupId>com.topcoder.thirdpart</groupId>
<artifactId>ifxjdbc</artifactId>
<version>1.0-SNAPSHOT</version>
>>>>>>> Stashed changes
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
@SuppressWarnings("serial")
public class Project extends AuditableObject implements Serializable {

public Project() {
}
/**
* Represents the id of this instance. Only values greater than or equal to zero is allowed. This variable is
* initialized in the constructor and can be accessed in the corresponding getter/setter method.
Expand Down Expand Up @@ -407,4 +409,8 @@ public String getTcDirectProjectName() {
public void setTcDirectProjectName(String tcDirectProjectName) {
this.tcDirectProjectName = tcDirectProjectName;
}

public void setAllProperties(Map properties) {
this.properties = properties;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*/
@SuppressWarnings("serial")
public class ProjectCategory implements Serializable {
public ProjectCategory() {
}
/**
* Represents Web Page Design project category.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
@SuppressWarnings("serial")
public class ProjectStatus implements Serializable {

public ProjectStatus() {
}
/**
* Represents the id of this instance. Only values greater than zero is allowed. This variable is initialized in the
* constructor and can be accessed in the corresponding getter/setter method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
*/
@SuppressWarnings("serial")
public class ProjectType implements Serializable {
public ProjectType() {
}
/**
* Represents Studio project type.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
* @version 2.0.3
*/
public class Phase extends AttributableObject {
public Phase() {
}
/**
* Represents the milliseconds value of one minute.
*/
Expand All @@ -62,7 +64,7 @@ public class Phase extends AttributableObject {
* Represents the project instance this phase belong to, it is initialized in the constructor and never changed
* afterward.
*/
private final Project project;
private Project project;

/**
* Represents the length of the phase in milliseconds, it will be initialized in the constructor, and set in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public class PhaseType implements Serializable {
*/
private String name;

public PhaseType() {
}

/**
* The constructor with the phase type id and name.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Project extends AttributableObject {
* Represents the instance of <code>Workdays</code> to calculate the end date for the phase in the project. It is
* initialized in the constructor, and never changed later.
*/
private final Workdays workdays;
private Workdays workdays;

/**
* Represents the start date of the project, it is initialized in the constructor, and changed in the setter method.
Expand All @@ -66,6 +66,8 @@ public class Project extends AttributableObject {
*/
private boolean changed = true;

public Project() {
}
/**
* Create a new instance with the start date of the project and the <code>Workdays</code> instance. There is no
* phases in the project initially.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class Group extends WeightedScorecardStructure {
* reference equality) are allowed.
* </p>
*/
private final List sections = new ArrayList();
private final List<Section> sections = new ArrayList();

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Constructors
Expand Down Expand Up @@ -300,6 +300,10 @@ public Section[] getAllSections() {
return (Section[]) sections.toArray(new Section[sections.size()]);
}

public void setAllSections(List<Section> allSections) {
this.sections.clear();
this.sections.addAll(allSections);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Member Methods - sections Miscellaneous Accessors and Mutators

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public class Scorecard extends NamedScorecardStructure {
* equality) are allowed.
* </p>
*/
private final List groups = new ArrayList();
private final List<Group> groups = new ArrayList();

/**
* Whether or not this scorecard is currently in active use.
Expand Down Expand Up @@ -676,6 +676,11 @@ public Group[] getAllGroups() {
return (Group[]) groups.toArray(new Group[groups.size()]);
}

public void setAllGroups(List<Group> groups) {
this.groups.clear();
this.groups.addAll(groups);
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Member Methods - group Miscellaneous Accessors Mutators

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Section extends WeightedScorecardStructure {
* reference equality) are allowed.
* </p>
*/
private final List questions = new ArrayList();
private final List<Question> questions = new ArrayList();

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Constructors
Expand Down Expand Up @@ -301,6 +301,10 @@ public Question[] getAllQuestions() {
return (Question[]) questions.toArray(new Question[questions.size()]);
}

public void setAllQuestions(List<Question> allQuestions) {
this.questions.clear();
this.questions.addAll(allQuestions);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Member Methods - questions Miscellaneous Accessors and Mutators

Expand Down
13 changes: 13 additions & 0 deletions tc-online-review-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## workdays

This is a component for tc online review

### prerequisites
- java 8
- maven

### package
- run `mvn clean package -DskipTests`

### install
- run `mvn clean install -DskipTests`
60 changes: 60 additions & 0 deletions tc-online-review-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
</parent>
<groupId>com.topcoder</groupId>
<artifactId>tc-online-review-api</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>jdbc</artifactId>
<version>4.50.8</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.7.3</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.topcoder.onlinereview;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

@SpringBootApplication
@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
public class OnlineReviewApplication {

public static void main(String[] args) {
SpringApplication.run(OnlineReviewApplication.class, args);
}

@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource =
new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:messages");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* Copyright (C) 2009 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.onlinereview.component.contest;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
* Represents the bass entity class for contest eligibility.
*
* <p><strong>Thread Safety</strong>: This class is not thread safe since it is mutable.
*
* @author TCSDEVELOPER
* @version 1.0
*/
@Data
@Entity
@Table(name = "contest_eligibility")
public class ContestEligibility implements Serializable {

/** The serial version UID. */
private static final long serialVersionUID = -7716443412438952646L;

/** Represents the id of the entity. */
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@SequenceGenerator(
name = "CONTEST_ELIGIBILITY_SEQ",
sequenceName = "CONTEST_ELIGIBILITY_SEQ",
allocationSize = 1)
@Column(name = "contest_eligibility_id")
private Long id;

/** Represents the id of the contest. */
@Column(name = "contest_id")
private Long contestId;

/** Represents the flag to indicate whether it is used for studio. */
@Column(name = "is_studio")
private Boolean studio;

/** It is a non-persistent flag to indicate a 'to be deleted' eligibility. */
@Transient private boolean deleted;
}
Loading