-
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
base: develop
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
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.
how is this different from the UploadJobManager? looks like a lot of duplicate code (almost all of it)?
@@ -81,4 +81,7 @@ CitationResults getCollectionItems(IUser user, String groupId, String collection | |||
long getLatestGroupVersion(IUser user, String groupId); | |||
|
|||
Map<ItemDeletionResponse, List<String>> deleteMultipleItems(IUser user, String groupId, List<String> citationKeys, Long citationVersion) throws ZoteroConnectionException, ZoteroHttpStatusException; | |||
|
|||
ICitationCollection createCitationCollection(IUser user, String groupId, String collectionName, String parentCollection) throws ZoteroItemCreationFailedException, ZoteroConnectionException; |
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?).
throw new ZoteroItemCreationFailedException(response); | ||
} | ||
|
||
// since we only submitted one item, there should only be one in the map |
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.
there was no item submitted, was there?
return "auth/import/collection"; | ||
} | ||
|
||
@RequestMapping(value = "/auth/import/collection/getgroupcollections", method = RequestMethod.GET) |
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.
this method is just for getting all collections of a group, right? we probably can't use the api collections controller because of the way we authenticate (if we can, that should be used), but there should be a separate controller (maybe in an api package within web/user
) that has a method to get the collections.
|
||
if (collectionId.equals("new")) { | ||
try { | ||
ICitationCollection collection = collectionManager.createCollection(user, group, files[0].getName(), null); |
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.
name should be entered by user
} | ||
} | ||
|
||
if (collectionId.equals("new")) { |
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.
a better approach would probably to leave the id empty if a new collection should be created.
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.
When the collection ID is blank, it means the citations will be added to the group, not under some collection. I have added separate text input for the new collection name to solve this issue.
Guidelines for Pull Requests
If you haven't yet read our code review guidelines, please do so, You can find them here.
Please confirm the following by adding an x for each item (turn
[ ]
into[x]
).Please provide a brief description of your ticket
We need a bulk upload for files.
... Put ticket description here and add link to ticket ...
The user would create a BibText export that includes files via Zotero (Zotero -> export collection -> BibTex format with "include files" checked). They would then zip the folder that Zotero exports and upload it to Citesphere. Citesphere would send it to the Citesphere Importer component (via Kafka like the other imports) and the importer would then create references in the zotero group the user specifies for the import (like for the web of science import that has no files) and send the files to Giles for processing (similar to how Giles sends individual files to Giles for processing).
https://diging.atlassian.net/browse/CITE-163
Are there any other pull requests that this one depends on?
diging/spring-social-zotero#24
diging/citesphere-messages#13
diging/citesphere-model#57
diging/citesphere-importer#23
Anything else the reviewer needs to know?
... describe here ...