use of org.jbei.ice.lib.executor.TransferTask in project ice by JBEI.
the class RemoteEntries method transferEntries.
/**
* Schedules a task to handle the transfer
*
* @param userId identifier of user making request
* @param remoteId local unique identifier for partner to transfer to
* @param selection context for generating entries to transfer or list of entries
* @throws PermissionException if user making request is not an administrator
*/
public void transferEntries(String userId, long remoteId, EntrySelection selection) {
AccountController accountController = new AccountController();
if (!accountController.isAdministrator(userId))
throw new PermissionException("Administrative privileges required to transfer entries");
TransferTask task = new TransferTask(userId, remoteId, selection);
IceExecutorService.getInstance().runTask(task);
}
Aggregations