Search in sources :

Example 1 with CustomExportTask

use of org.jbei.ice.lib.entry.export.CustomExportTask in project ice by JBEI.

the class PartResource method customExport.

@POST
@Path("/custom")
@Produces(MediaType.APPLICATION_JSON)
public Response customExport(@QueryParam("sequenceFormat") String sequenceFormat, @DefaultValue("true") @QueryParam("onePerFolder") boolean onePerFolder, EntrySelection selection) {
    String userId = super.requireUserId();
    SequenceFormat format = SequenceFormat.fromString(sequenceFormat.toUpperCase());
    CustomExportTask task = new CustomExportTask(userId, selection, format, onePerFolder);
    IceExecutorService.getInstance().runTask(task);
    return super.respond(true);
}
Also used : SequenceFormat(org.jbei.ice.lib.entry.sequence.SequenceFormat) CustomExportTask(org.jbei.ice.lib.entry.export.CustomExportTask)

Aggregations

CustomExportTask (org.jbei.ice.lib.entry.export.CustomExportTask)1 SequenceFormat (org.jbei.ice.lib.entry.sequence.SequenceFormat)1