-
Notifications
You must be signed in to change notification settings - Fork 4
Story/cite 163 - We need a bulk upload for files. #295
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
PradnyaC11
wants to merge
25
commits into
develop
Choose a base branch
from
story/CITE-163
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+511
−5
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4312013
[CITE-163] Created collection.html page to import collection
PradnyaC11 d426a75
[CITE-163] Added POST for collection upload in ImportCollectionContro…
PradnyaC11 fe9e22d
[CITE-163] Added response to uploadCollection method
PradnyaC11 57563b4
[CITE-163] Fixing errors in upload collection code
PradnyaC11 505c2f2
[CITE-163] Updated the POST URL for upload collection
PradnyaC11 a108d4a
[CITE-163] Removed IUploadJobCollection class
PradnyaC11 c5c9cfc
[CITE-163] Added select for collections on import collection page
PradnyaC11 2134b97
[CITE-163] Added method to get collections of selected group
PradnyaC11 da60307
[CITE-163] Updated Upload job to include collectionId
PradnyaC11 57314c4
[CITE-163] Resolved importing to collection issue
PradnyaC11 ccb03f8
[CITE-163] Added option to select new collection
PradnyaC11 5a668b0
[CITE-163] Added methods to create new collection
PradnyaC11 75f108a
[CITE-163] Resolved issues with create new citation
PradnyaC11 35a4143
Merge branch 'develop' into story/CITE-163
PradnyaC11 8bac348
[CITE-163] Updated get group item API call
PradnyaC11 70cd62b
[CITE-163] Updated ItemTextController to added headers
PradnyaC11 13d0810
[CITE-163] Updated JobInfoController with giles token
PradnyaC11 9c4e0e9
[CITE-163] Updated get item API to use headers
PradnyaC11 073a5a0
[CITE-163] Updated versions in pom.xml
PradnyaC11 34721c4
[CITE-163] Cleaned-up code
PradnyaC11 9754d1b
[CITE-163] Removed unwanted changes
PradnyaC11 3d72e60
[CITE-163] Resolved code factor issue
PradnyaC11 d19ed0a
Merge branch 'develop' into story/CITE-163
PradnyaC11 1eba17e
Merge branch 'develop' into story/CITE-163
PradnyaC11 9f35112
[CITE-163] Addressed PR comments
PradnyaC11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
citesphere/src/main/java/edu/asu/diging/citesphere/web/user/GetCollectionListController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| package edu.asu.diging.citesphere.web.user; | ||
|
|
||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.http.HttpStatus; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.security.core.Authentication; | ||
| import org.springframework.stereotype.Controller; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RequestMethod; | ||
| import org.springframework.web.bind.annotation.RequestParam; | ||
|
|
||
| import edu.asu.diging.citesphere.api.v1.model.impl.Collections; | ||
| import edu.asu.diging.citesphere.api.v1.user.JsonUtil; | ||
| import edu.asu.diging.citesphere.core.exceptions.GroupDoesNotExistException; | ||
| import edu.asu.diging.citesphere.core.service.ICitationCollectionManager; | ||
| import edu.asu.diging.citesphere.core.service.IGroupManager; | ||
| import edu.asu.diging.citesphere.model.bib.ICitationGroup; | ||
| import edu.asu.diging.citesphere.user.IUser; | ||
|
|
||
| @Controller | ||
| public class GetCollectionListController { | ||
| private final Logger logger = LoggerFactory.getLogger(getClass()); | ||
|
|
||
| @Autowired | ||
| private ICitationCollectionManager collectionManager; | ||
|
|
||
| @Autowired | ||
| private IGroupManager groupManager; | ||
|
|
||
| @Autowired | ||
| private JsonUtil jsonUtil; | ||
|
|
||
| @RequestMapping(value = "/auth/import/collection/getgroupcollections", method = RequestMethod.GET) | ||
| public ResponseEntity<Collections> getCollections( @RequestParam("groupId") String groupId, Authentication authentication) { | ||
| IUser user = (IUser)authentication.getPrincipal(); | ||
|
|
||
| ICitationGroup group = groupManager.getGroup(user, groupId); | ||
| if (group == null) { | ||
| return new ResponseEntity<Collections>(HttpStatus.NOT_FOUND); | ||
| } | ||
|
|
||
| Collections collectionResponse = new Collections(); | ||
| collectionResponse.setGroup(jsonUtil.createGroup(group)); | ||
| try { | ||
| collectionResponse.setCollections( | ||
| collectionManager.getAllCollections(user, groupId, null, "title", 20)); | ||
| } catch (GroupDoesNotExistException e) { | ||
| logger.error("Could not create job because group does not exist.", e); | ||
| return new ResponseEntity<Collections>(HttpStatus.BAD_REQUEST); | ||
| } | ||
| return new ResponseEntity<Collections>(collectionResponse, HttpStatus.OK); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs javadoc (including explanation of parentCollection: null if no parent collection?).