public class BulkUploadController extends Object
Constructor and Description |
---|
BulkUploadController() |
Modifier and Type | Method and Description |
---|---|
AttachmentInfo |
addAttachment(String userId,
long bulkUploadId,
long entryId,
InputStream fileInputStream,
String fileName) |
AccessPermission |
addPermission(String userId,
long uploadId,
AccessPermission access)
Adds specified access permission to the bulk upload.
|
SequenceInfo |
addSequence(String userId,
long bulkUploadId,
long entryId,
String sequenceString,
String fileName) |
boolean |
approveBulkImport(String userId,
long id) |
BulkUploadAutoUpdate |
autoUpdateBulkUpload(String userId,
BulkUploadAutoUpdate autoUpdate,
EntryType addType) |
protected void |
clearBulkEdits(String userId)
Removes any bulk edits belonging to the specified user
|
BulkUploadInfo |
create(String userId,
BulkUploadInfo info)
Creates a new bulk upload.
|
boolean |
deleteAttachment(String userId,
long bulkUploadId,
long entryId) |
BulkUploadInfo |
deleteDraftById(String userId,
long draftId)
Deletes a bulk import draft referenced by a unique identifier.
|
boolean |
deleteEntry(String userId,
long uploadId,
long entryId) |
boolean |
deletePermission(String userId,
long uploadId,
long permissionId)
Removes specified permission from bulk upload
|
BulkUploadInfo |
getBulkImport(String userId,
long id,
int offset,
int limit)
Retrieves bulk import and entries associated with it that are referenced by the id in the parameter.
|
ArrayList<String> |
getMatchingPartNumbersForLinks(EntryType type,
String token,
int limit)
Retrieves part numbers that match the token passed in the parameter, that are compatible with the type
in the parameter.
|
HashMap<String,ArrayList<BulkUploadInfo>> |
getPendingImports(String userId)
Retrieves list of bulk imports that are owned by the system.
|
ArrayList<BulkUploadInfo> |
getPendingUploads(String userId) |
List<AccessPermission> |
getUploadPermissions(String userId,
long uploadId) |
ArrayList<BulkUploadInfo> |
retrieveByUser(String requesterId,
String userAccountId)
Retrieves list of user saved bulk imports.
|
boolean |
revertSubmitted(Account account,
long uploadId) |
protected PartData |
setFileData(String userId,
Entry entry,
PartData partData) |
public BulkUploadInfo create(String userId, BulkUploadInfo info)
userId
- identifier for user making requestinfo
- bulk upload dataprotected void clearBulkEdits(String userId)
userId
- unique identifier for user whose bulk edits are to be removedpublic HashMap<String,ArrayList<BulkUploadInfo>> getPendingImports(String userId)
Administrative privileges are required for making this call
userId
- account for user making request; expected to be an administratorpublic BulkUploadInfo getBulkImport(String userId, long id, int offset, int limit)
userId
- identifier for account of user requestingid
- unique identifier for bulk importoffset
- offset for upload entries (start)limit
- maximum number of entries to return with the uploadPermissionException
public ArrayList<BulkUploadInfo> retrieveByUser(String requesterId, String userAccountId)
requesterId
- account of requesting useruserAccountId
- account identifier for user whose saved drafts are being requestedpublic ArrayList<BulkUploadInfo> getPendingUploads(String userId)
public BulkUploadInfo deleteDraftById(String userId, long draftId) throws PermissionException
userId
- account of user making the requestdraftId
- unique identifier for bulk importPermissionException
public BulkUploadAutoUpdate autoUpdateBulkUpload(String userId, BulkUploadAutoUpdate autoUpdate, EntryType addType)
public boolean revertSubmitted(Account account, long uploadId)
public boolean approveBulkImport(String userId, long id)
public SequenceInfo addSequence(String userId, long bulkUploadId, long entryId, String sequenceString, String fileName)
public AttachmentInfo addAttachment(String userId, long bulkUploadId, long entryId, InputStream fileInputStream, String fileName)
public boolean deleteAttachment(String userId, long bulkUploadId, long entryId)
public boolean deleteEntry(String userId, long uploadId, long entryId)
public List<AccessPermission> getUploadPermissions(String userId, long uploadId)
public AccessPermission addPermission(String userId, long uploadId, AccessPermission access)
userId
- unique identifier of user making the request. Must be an admin or owner of the uploaduploadId
- unique identifier for bulk uploadaccess
- details about the permission to the addedIllegalArgumentException
- if the upload cannot be located using its identifierpublic boolean deletePermission(String userId, long uploadId, long permissionId)
userId
- unique identifier of user making the request. Must be an admin or owner of the bulk uploaduploadId
- unique identifier for bulk uploadpermissionId
- unique identifier for permission that has been previously added to uploadIllegalArgumentException
- if upload or permission cannot be located by their identifierspublic ArrayList<String> getMatchingPartNumbersForLinks(EntryType type, String token, int limit)
type
- type of entry the part numbers must be compatible withtoken
- part number token to matchlimit
- maximum number of matches to returnCopyright © 2017. All rights reserved.