This is the codeAbility Sharing Platform! Learn more about the
codeAbility Sharing Platform
.
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
codeAbility Sharing Platform
Manage
Activity
Members
Labels
Plan
Issues
43
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
development
sharing
codeAbility Sharing Platform
Commits
4a1897db
Commit
4a1897db
authored
4 years ago
by
Daniel Rainer
Browse files
Options
Downloads
Patches
Plain Diff
Clean up SearchResource.java
parent
9c704657
2 merge requests
!17
Initial Merge to Prepare Release 1.0.0
,
!2
Add gitlab metadata
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/at/ac/uibk/gitsearch/web/rest/SearchResource.java
+46
-47
46 additions, 47 deletions
...in/java/at/ac/uibk/gitsearch/web/rest/SearchResource.java
with
46 additions
and
47 deletions
src/main/java/at/ac/uibk/gitsearch/web/rest/SearchResource.java
+
46
−
47
View file @
4a1897db
...
...
@@ -2,7 +2,6 @@ package at.ac.uibk.gitsearch.web.rest;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map.Entry
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -28,7 +27,7 @@ import at.ac.uibk.gitsearch.service.dto.SearchResultsDTO;
@Transactional
public
class
SearchResource
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
SearchResource
.
class
);
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
SearchResource
.
class
);
private
final
SearchService
searchService
;
...
...
@@ -37,66 +36,66 @@ public class SearchResource {
}
/**
* {@code SEARCH /search/page-details} : search for the searchResults corresponding
*
to the query.
* {@code SEARCH /search/page-details} : search for the searchResults corresponding
* to the query.
*
* @param query the query of the searchResult search.
* @return the result of the search.
* @param query the query of the searchResult search.
* @return the result of the search.
*/
@PostMapping
(
"/search/page-details"
)
public
SearchResultsDTO
searchPageDetails
(
@RequestBody
SearchInputDTO
query
)
throws
IOException
{
log
.
debug
(
"REST request to search {}"
,
query
);
return
searchService
.
searchResultPage
(
query
,
SearchInputDTO
.
PAGE_SIZE
*
query
.
getPage
(),
SearchInputDTO
.
PAGE_SIZE
);
return
searchService
.
searchResultPage
(
query
,
(
long
)
SearchInputDTO
.
PAGE_SIZE
*
(
long
)
query
.
getPage
(),
SearchInputDTO
.
PAGE_SIZE
);
}
/**
* returns all keyword autocompletes for keyWord
*
* @param keyWordPrefix
* @return
* @throws IOException
*/
/**
* returns all keyword autocompletes for keyWord
*
* @param keyWordPrefix
* @return
* @throws IOException
*/
@GetMapping
(
"/search/keywordsAutoComplete"
)
public
List
<
AutoCompleteEntry
>
getKeywordsAutoComplete
(
@RequestParam
String
keyWordPrefix
)
throws
IOException
{
return
searchService
.
getKeywordsAutoComplete
(
keyWordPrefix
);
}
public
List
<
AutoCompleteEntry
>
getKeywordsAutoComplete
(
@RequestParam
String
keyWordPrefix
)
throws
IOException
{
return
searchService
.
getKeywordsAutoComplete
(
keyWordPrefix
);
}
/**
* returns all creator autocompletes
*
* @param creatorPrefix
* @return
* @throws IOException
*/
/**
* returns all creator autocompletes
*
* @param creatorPrefix
* @return
* @throws IOException
*/
@GetMapping
(
"/search/creatorAutoComplete"
)
public
List
<
AutoCompleteEntry
>
getCreatorAutoComplete
(
@RequestParam
String
creatorPrefix
)
throws
IOException
{
return
searchService
.
getCreatorAutoComplete
(
creatorPrefix
);
}
public
List
<
AutoCompleteEntry
>
getCreatorAutoComplete
(
@RequestParam
String
creatorPrefix
)
throws
IOException
{
return
searchService
.
getCreatorAutoComplete
(
creatorPrefix
);
}
/**
* returns all contributor autocompletes
*
* @param contributorPrefix
* @return
* @throws IOException
*/
/**
* returns all contributor autocompletes
*
* @param contributorPrefix
* @return
* @throws IOException
*/
@GetMapping
(
"/search/contributorAutoComplete"
)
public
List
<
AutoCompleteEntry
>
getContributorAutoComplete
(
@RequestParam
String
contributorPrefix
)
throws
IOException
{
return
searchService
.
getContributorAutoComplete
(
contributorPrefix
);
}
public
List
<
AutoCompleteEntry
>
getContributorAutoComplete
(
@RequestParam
String
contributorPrefix
)
throws
IOException
{
return
searchService
.
getContributorAutoComplete
(
contributorPrefix
);
}
/**
* returns all programmingLanguage autocompletes for keyWord
*
* @param programmingLanguagePrefix
* @return
* @throws IOException
*/
/**
* returns all programmingLanguage autocompletes for keyWord
*
* @param programmingLanguagePrefix
* @return
* @throws IOException
*/
@GetMapping
(
"/search/programmingLanguageAutoComplete"
)
public
List
<
AutoCompleteEntry
>
getProgrammingLanguageAutoComplete
(
@RequestParam
String
programmingLanguagePrefix
)
throws
IOException
{
return
searchService
.
getProgrammingLanguageAutoComplete
(
programmingLanguagePrefix
);
}
public
List
<
AutoCompleteEntry
>
getProgrammingLanguageAutoComplete
(
@RequestParam
String
programmingLanguagePrefix
)
throws
IOException
{
return
searchService
.
getProgrammingLanguageAutoComplete
(
programmingLanguagePrefix
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment