Skip to content

Commit

Permalink
Merge pull request #882 from zfi/master
Browse files Browse the repository at this point in the history
Updates to release 0.94.304
  • Loading branch information
zfi authored Jan 11, 2017
2 parents e348960 + fc3b322 commit bfd4c20
Show file tree
Hide file tree
Showing 76 changed files with 8,504 additions and 6,365 deletions.
44 changes: 36 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
<metrics-version>3.1.0</metrics-version>
<jersey.version>1.19</jersey.version>
</properties>

<repositories>
<repository>
<id>netbeans.maven2.repository</id>
<url>http://bits.netbeans.org/maven2/</url>
</repository>
</repositories>

<build>
<resources>
Expand Down Expand Up @@ -55,6 +62,7 @@
<configuration>
<source>1.7</source>
<target>1.7</target>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -90,7 +98,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
<version>5.1.40</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -224,15 +232,16 @@
</dependency>

<!-- Dependencies for logging -->
<!-- sl4fj is a facade for various logging frameworks -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.6</version>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.6</version>
<version>1.7.21</version>
</dependency>
<!-- END Logging Dependencies -->

Expand Down Expand Up @@ -457,7 +466,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
<version>5.1.40</version>
</dependency>

<dependency>
Expand All @@ -472,8 +481,6 @@
<version>1.8.3</version>
</dependency>



<!-- Clients for other Parallax servers -->
<dependency>
<groupId>com.parallax.client</groupId>
Expand All @@ -486,8 +493,29 @@
<artifactId>Cloud-Compiler-java-client</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>



<!-- Unit Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.netbeans.api/org-netbeans-modules-nbjunit -->
<!-- <dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-nbjunit</artifactId>
<version>RELEASE801</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.netbeans.api/org-netbeans-modules-jellytools-platform -->
<!-- <dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-jellytools-platform</artifactId>
<version>RELEASE801</version>
</dependency>
-->
</dependencies>

</project>
13 changes: 8 additions & 5 deletions src/main/config/default/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
<param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
</layout>
</appender>
<root>
<priority value="info"></priority>
<appender-ref ref="stdout"/>
</root>
<Logger name="log4j.category.com.parallax.server" level="DEBUG"/>
<loggers>
<Logger name="com.parallax.server.blocklyprop.monitoring" level="trace" additivity="false">
<AppenderRef ref="stdout"/>
</Logger>
<root level="info">
<appender-ref ref="stdout"/>
</root>
</loggers>
</log4j:configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@ public JsonObject toJson(ProjectRecord project) {
result.addProperty("modified", DateConversion.toDateTimeString(project.getModified().getTime()));
boolean isYours = project.getIdUser().equals(BlocklyPropSecurityUtils.getCurrentUserId());
result.addProperty("yours", isYours);
if (!isYours) {
result.addProperty("user", userService.getUserScreenName(project.getIdUser()));

} else {
result.addProperty("user", userService.getUserScreenName(project.getIdUser()));
if (isYours) {
List<ProjectSharingRecord> projectSharingRecords = projectSharingService.getSharingInfo(project.getId());
if (projectSharingRecords != null && !projectSharingRecords.isEmpty()) {
result.addProperty("share-key", projectSharingRecords.get(0).getSharekey());
Expand Down Expand Up @@ -126,9 +124,7 @@ public JsonObject toJson(Project project) {
result.addProperty("modified", DateConversion.toDateTimeString(project.getModified().getTime()));
boolean isYours = project.getIdUser().equals(BlocklyPropSecurityUtils.getCurrentUserId());
result.addProperty("yours", isYours);
if (!isYours) {
result.addProperty("user", userService.getUserScreenName(project.getIdUser()));
}
result.addProperty("user", userService.getUserScreenName(project.getIdUser()));

if (project.getBasedOn() != null) {
JsonObject basedOn = new JsonObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,59 @@ public interface ProjectDao {

ProjectRecord getProject(Long idProject);

ProjectRecord createProject(String name, String description, String descriptionHtml, String code, ProjectType type, String board, boolean privateProject, boolean sharedProject);

ProjectRecord createProject(String name, String description, String descriptionHtml, ProjectType type, String board, boolean privateProject, boolean sharedProject);

ProjectRecord updateProject(Long idProject, String name, String description, String descriptionHtml, boolean privateProject, boolean sharedProject);

ProjectRecord updateProject(Long idProject, String name, String description, String descriptionHtml, String code, boolean privateProject, boolean sharedProject);

ProjectRecord saveCode(Long idProject, String code);

List<ProjectRecord> getUserProjects(Long idUser, TableSort sort, TableOrder order, Integer limit, Integer offset);

List<ProjectRecord> getSharedProjects(TableSort sort, TableOrder order, Integer limit, Integer offset, Long idUser);
ProjectRecord createProject(
String name,
String description,
String descriptionHtml,
String code,
ProjectType type,
String board,
boolean privateProject,
boolean sharedProject);

ProjectRecord createProject(
String name,
String description,
String descriptionHtml,
ProjectType type,
String board,
boolean privateProject,
boolean sharedProject);

ProjectRecord updateProject(
Long idProject,
String name,
String description,
String descriptionHtml,
boolean privateProject,
boolean sharedProject);

ProjectRecord updateProject(
Long idProject,
String name,
String description,
String descriptionHtml,
String code,
boolean privateProject,
boolean sharedProject);

ProjectRecord saveCode(
Long idProject,
String code);

List<ProjectRecord> getUserProjects(
Long idUser,
TableSort sort,
TableOrder order,
Integer limit,
Integer offset);

List<ProjectRecord> getSharedProjects(
TableSort sort,
TableOrder order,
Integer limit,
Integer offset,
Long idUser);

int countUserProjects(Long idUser);

Expand All @@ -41,8 +81,13 @@ public interface ProjectDao {

boolean deleteProject(Long idProject);

ProjectRecord updateProjectCode(Long idProject, String code);
ProjectRecord updateProjectCode(
Long idProject,
String code);

ProjectRecord saveProjectCodeAs(Long idProject, String code, String newName);
ProjectRecord saveProjectCodeAs(
Long idProject,
String code,
String newName);

}
Loading

0 comments on commit bfd4c20

Please sign in to comment.