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

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • development/sharing/codeability-sharing-platform
1 result
Show changes
Commits on Source (5)
...@@ -401,8 +401,6 @@ public class MetaDataRepository { ...@@ -401,8 +401,6 @@ public class MetaDataRepository {
int ranking5 = 1; int ranking5 = 1;
if (maxScore>0.0f) ranking5 = (int) ((hitScore*5.0)/maxScore+0.5f); if (maxScore>0.0f) ranking5 = (int) ((hitScore*5.0)/maxScore+0.5f);
parsedSearchHit.setRanking5(ranking5); parsedSearchHit.setRanking5(ranking5);
parsedSearchHit.setDownloads(0);
parsedSearchHit.setViews(0);
searchResults.add(parsedSearchHit); searchResults.add(parsedSearchHit);
} }
......
...@@ -70,29 +70,10 @@ public class SearchResultDTO { ...@@ -70,29 +70,10 @@ public class SearchResultDTO {
private int ranking5; private int ranking5;
private List<PluginActionInfo> supportedActions = new ArrayList<>(2); private List<PluginActionInfo> supportedActions = new ArrayList<>(2);
private Integer views;
private Integer downloads;
public SearchResultDTO() { public SearchResultDTO() {
// default constructor // default constructor
} }
public Integer getDownloads() {
return downloads;
}
public void setDownloads(Integer downloads) {
this.downloads = downloads;
}
public Integer getViews() {
return views;
}
public void setViews(Integer views) {
this.views = views;
}
/** /**
* clone constructor * clone constructor
* *
......
...@@ -64,6 +64,11 @@ ...@@ -64,6 +64,11 @@
[value]="exercise.programmingLanguages"> [value]="exercise.programmingLanguages">
</jhi-exercise-metadata-item> </jhi-exercise-metadata-item>
<jhi-exercise-metadata-item
[description]="'exercise.metadata.language'"
[value]="exercise.languages">
</jhi-exercise-metadata-item>
<jhi-exercise-metadata-item <jhi-exercise-metadata-item
[description]="'exercise.metadata.requires'" [description]="'exercise.metadata.requires'"
[value]="exercise.requires"> [value]="exercise.requires">
......
...@@ -16,8 +16,8 @@ public class SearchResultDTOTest { ...@@ -16,8 +16,8 @@ public class SearchResultDTOTest {
propertiesTester.testProperties(SearchResultDTO.class); propertiesTester.testProperties(SearchResultDTO.class);
SearchResultDTO testSR = new SearchResultDTO(); SearchResultDTO testSR = new SearchResultDTO();
SearchResultDTO testSRclone = new SearchResultDTO(testSR); SearchResultDTO testSRclone = new SearchResultDTO(testSR);
Assert.assertEquals("clone should be equas", testSR, testSRclone); Assert.assertEquals("clone should be equal", testSR, testSRclone);
EqualsVerifier.forClass(SearchResultDTO.class).suppress(Warning.NONFINAL_FIELDS) EqualsVerifier.forClass(SearchResultDTO.class).suppress(Warning.NONFINAL_FIELDS)
.withIgnoredFields("ranking5", "supportedActions", "views", "downloads").verify(); .withIgnoredFields("ranking5", "supportedActions").verify();
} }
} }