This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Commit 5c665404 authored by Michael Breu's avatar Michael Breu
Browse files

Minor Bug Fix

parent 7a0e1888
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.codeability.sharing</groupId>
<artifactId>SharingPluginPlatformAPI</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<name>SharingPluginPlatformAPI</name>
<description>CodeAbility Sharing Plugin Platform API</description>
<packaging>jar</packaging>
......
......@@ -78,7 +78,7 @@ public class SearchInputMetadataDTO {
/**
* sets the format
* @param format
* @param format the format
*/
public void setFormat(String format) {
this.format = format;
......@@ -86,7 +86,7 @@ public class SearchInputMetadataDTO {
/**
* checks for minimal meta data
* @return
* @return the meta data
*/
public boolean hasMetadataInput() {
return !(programmingLanguage == null
......
......@@ -15,8 +15,8 @@ public class SearchRequestDTO {
/**
* comfort constructor with selected initialization values
* @param userPrincipal
* @param query
* @param userPrincipal the user principal
* @param query the query
*/
public SearchRequestDTO(UserPrincipal userPrincipal, SearchInputDTO query) {
super();
......
......@@ -58,7 +58,7 @@ public class SearchResultsDTO {
/**
* returns the number of all hits.
*
* @return
* @return the hit count
*/
public long getHitCount() {
return hitCount;
......
......@@ -325,7 +325,7 @@ public class UserProvidedMetadataDTO {
/**
* clone constructor
*
* @param toClone
* @param toClone the original
*/
public UserProvidedMetadataDTO(UserProvidedMetadataDTO toClone) {
super();
......
......@@ -86,6 +86,19 @@ public class ExerciseId {
return "["+projectId + "]" + path;
}
public boolean isDescendantOf(ExerciseId parent) {
if(parent.gitUrl!=null && !parent.gitUrl.equals(this.gitUrl))
return false;
if(parent.gitUrl==null && this.gitUrl!=null)
return false;
// we are in same repository
if(!StringUtils.equals(parent.projectId, this.projectId))
return false;
if(parent.path == null) return true;
if(this.path == null) return false;
return this.path.startsWith(parent.path);
}
/**
* parses the external representation of an ExerciseId.
* @param externalRepresentation
......
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codeability.sharing</groupId>
<artifactId>SharingPluginPlatformAPI</artifactId>
<version>0.3.1</version>
<name>SharingPluginPlatformAPI</name>
<description>CodeAbility Sharing Plugin Platform API</description>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Plugin versions -->
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>3.0.0-M4</maven-failsafe-plugin.version>
<maven-idea-plugin.version>2.2.1</maven-idea-plugin.version>
<maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
<maven-war-plugin.version>3.2.3</maven-war-plugin.version>
<maven-checkstyle.version>3.1.1</maven-checkstyle.version>
<checkstyle.version>8.32</checkstyle.version>
<spring-nohttp-checkstyle.version>0.0.4.RELEASE</spring-nohttp-checkstyle.version>
<frontend-maven-plugin.version>1.10.0</frontend-maven-plugin.version>
<git-commit-id-plugin.version>4.0.0</git-commit-id-plugin.version>
<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
<sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-jaxb-annotations -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>2.10.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>target</id>
<name>Local target repository, to be promoted to git</name>
<url>file://${project.basedir}/target</url>
<layout>default</layout>
</repository>
</distributionManagement>
<build>
<defaultGoal>package</defaultGoal>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven-checkstyle.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>${maven-eclipse-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>${maven-idea-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<!-- unused <executions> <execution> <id>deploy-to-local-directory</id>
<phase>install</phase> <goals> <goal>copy-resources</goal> </goals> <configuration>
<outputDirectory>./target</outputDirectory> <resources> <resource> <directory>${project.build.directory}</directory>
<includes> <include>${project.build.finalName}.jar</include> </includes>
<filtering>false</filtering> </resource> </resources> </configuration> </execution>
</executions> -->
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>deploy</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<groupId>org.codeability.sharing</groupId>
<artifactId>SharingPluginPlatformAPI</artifactId>
<versioning>
<release>0.3.0</release>
<release>0.3.1</release>
<versions>
<version>0.0.1</version>
<version>0.0.2</version>
......@@ -22,7 +22,8 @@
<version>0.1.10</version>
<version>0.2.1</version>
<version>0.3.0</version>
<version>0.3.1</version>
</versions>
<lastUpdated>20220321085530</lastUpdated>
<lastUpdated>20220323180821</lastUpdated>
</versioning>
</metadata>
76a5c043acd1cb669dc118d5f3b6fb9d
\ No newline at end of file
7684991fdc1d1846ec0f0422046c213d
\ No newline at end of file
f389b948e0e032e934e0b47464a54bf82a4f9b5a
\ No newline at end of file
bc5b790a48ec316095de6d8fbc99e80857285c62
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment