@@ -92,7 +92,7 @@ public BulkUploadInfo create(String userId, BulkUploadInfo info) {
92
92
if (info .getEntryList () != null ) {
93
93
for (PartData data : info .getEntryList ()) {
94
94
Entry entry = entryDAO .get (data .getId ());
95
- // todo if entry is in another bulk upload, then update (line 95) will fail
95
+ // todo if entry is in another bulk upload, then update will fail
96
96
if (entry == null )
97
97
continue ;
98
98
@@ -159,6 +159,8 @@ public HashMap<String, ArrayList<BulkUploadInfo>> getPendingImports(String userI
159
159
*
160
160
* @param userId identifier for account of user requesting
161
161
* @param id unique identifier for bulk import
162
+ * @param offset offset for upload entries (start)
163
+ * @param limit maximum number of entries to return with the upload
162
164
* @return data transfer object with the retrieved bulk import data and associated entries
163
165
* @throws PermissionException
164
166
*/
@@ -212,35 +214,6 @@ protected PartData setFileData(String userId, Entry entry, PartData partData) {
212
214
return partData ;
213
215
}
214
216
215
- protected ArrayList <PartData > convertParts (Account account , List <Entry > contents ) {
216
- ArrayList <PartData > addList = new ArrayList <>();
217
- SequenceDAO sequenceDAO = DAOFactory .getSequenceDAO ();
218
-
219
- for (Entry entry : contents ) {
220
- ArrayList <Attachment > attachments = attachmentController .getByEntry (account .getEmail (), entry );
221
- boolean hasSequence = sequenceDAO .hasSequence (entry .getId ());
222
- boolean hasOriginalSequence = sequenceDAO .hasOriginalSequence (entry .getId ());
223
- PartData info = ModelToInfoFactory .getInfo (entry );
224
- ArrayList <AttachmentInfo > attachmentInfos = ModelToInfoFactory .getAttachments (attachments );
225
- info .setAttachments (attachmentInfos );
226
- info .setHasAttachment (!attachmentInfos .isEmpty ());
227
- info .setHasSequence (hasSequence );
228
- info .setHasOriginalSequence (hasOriginalSequence );
229
-
230
- // retrieve permission
231
- Set <Permission > entryPermissions = entry .getPermissions ();
232
- if (entryPermissions != null && !entryPermissions .isEmpty ()) {
233
- for (Permission permission : entryPermissions ) {
234
- info .getAccessPermissions ().add (permission .toDataTransferObject ());
235
- }
236
- }
237
-
238
- addList .add (info );
239
- }
240
-
241
- return addList ;
242
- }
243
-
244
217
/**
245
218
* Retrieves list of user saved bulk imports. Only the owner or an administrator can retrieve it
246
219
*
0 commit comments