@Path(value="printers")
public class PrinterService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SlicingProfile.Font |
DEFAULT_FONT |
static PrinterService |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
MachineResponse |
calibrate(java.lang.String printerName,
double xPixelsPerMM,
double yPixelsPerMM) |
MachineResponse |
closeShutter(java.lang.String printerName) |
Printer |
createTemplatePrinter() |
MachineResponse |
deletePrinter(java.lang.String printerName) |
MachineResponse |
executeGCode(java.lang.String printerName,
java.lang.String gcode) |
Printer |
getPrinter(java.lang.String printerName) |
java.util.List<Printer> |
getPrinters() |
MachineResponse |
getRemainingResin(java.lang.String printerName) |
MachineResponse |
homeX(java.lang.String printerName) |
MachineResponse |
homeY(java.lang.String printerName) |
MachineResponse |
homeZ(java.lang.String printerName) |
MachineResponse |
motorsOff(java.lang.String printerName) |
MachineResponse |
motorsOn(java.lang.String printerName) |
MachineResponse |
moveX(java.lang.String dist,
java.lang.String printerName) |
MachineResponse |
moveY(java.lang.String dist,
java.lang.String printerName) |
MachineResponse |
moveZ(java.lang.String dist,
java.lang.String printerName) |
MachineResponse |
openShutter(java.lang.String printerName) |
MachineResponse |
print(java.lang.String fileName,
java.lang.String printername) |
MachineResponse |
savePrinter(Printer printerToSave) |
MachineResponse |
showBlankScreen(java.lang.String printerName) |
MachineResponse |
showCalibrationScreen(java.lang.String printerName,
int xPixels,
int yPixels) |
MachineResponse |
showGridScreen(java.lang.String printerName,
int pixels) |
MachineResponse |
startPrinter(java.lang.String printerName) |
MachineResponse |
startProjector(java.lang.String printerName) |
MachineResponse |
stopPrinter(java.lang.String printerName) |
MachineResponse |
stopProjector(java.lang.String printerName) |
TestingResult |
testScript(java.lang.String printerName,
java.lang.String scriptName,
java.lang.String javascript,
java.lang.String expectedReturnTypeString) |
TestingResult |
testTemplate(java.lang.String printerName,
java.lang.String templateName,
java.lang.String template) |
public static PrinterService INSTANCE
public static SlicingProfile.Font DEFAULT_FONT
@GET @Path(value="openshutter/{printername}") @Produces(value="application/json") public MachineResponse openShutter(@PathParam(value="printername") java.lang.String printerName) throws InappropriateDeviceException
InappropriateDeviceException
@GET @Path(value="closeshutter/{printername}") @Produces(value="application/json") public MachineResponse closeShutter(@PathParam(value="printername") java.lang.String printerName) throws InappropriateDeviceException
InappropriateDeviceException
@GET @Path(value="list") @Produces(value="application/json") public java.util.List<Printer> getPrinters()
@GET @Path(value="get/{printername}") @Produces(value="application/json") public Printer getPrinter(@PathParam(value="printername") java.lang.String printerName) throws InappropriateDeviceException
InappropriateDeviceException
@GET @POST @DELETE @Path(value="delete/{printername}") @Produces(value="application/json") public MachineResponse deletePrinter(@PathParam(value="printername") java.lang.String printerName)
@POST @Path(value="save") @Produces(value="application/json") @Consumes(value="application/json") public MachineResponse savePrinter(Printer printerToSave)
@GET @POST @Path(value="start/{printername}") @Produces(value="application/json") public MachineResponse startPrinter(@PathParam(value="printername") java.lang.String printerName)
@GET @POST @Path(value="stop/{printername}") @Produces(value="application/json") public MachineResponse stopPrinter(@PathParam(value="printername") java.lang.String printerName)
@POST @Path(value="createTemplatePrinter") @Produces(value="application/json") public Printer createTemplatePrinter() throws InappropriateDeviceException
InappropriateDeviceException
@GET @Path(value="showGridScreen/{printername}/{pixels}") @Produces(value="application/json") public MachineResponse showGridScreen(@PathParam(value="printername") java.lang.String printerName, @PathParam(value="pixels") int pixels)
@GET @Path(value="showCalibrationScreen/{printername}/{xpixels}/{ypixels}") @Produces(value="application/json") public MachineResponse showCalibrationScreen(@PathParam(value="printername") java.lang.String printerName, @PathParam(value="xpixels") int xPixels, @PathParam(value="ypixels") int yPixels)
@GET @Path(value="calibrate/{printername}/{xpixelspermm}/{ypixelspermm}") @Produces(value="application/json") public MachineResponse calibrate(@PathParam(value="printername") java.lang.String printerName, @PathParam(value="xpixelspermm") double xPixelsPerMM, @PathParam(value="ypixelspermm") double yPixelsPerMM)
@GET @Path(value="showBlankScreen/{printername}") @Produces(value="application/json") public MachineResponse showBlankScreen(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="executeGCode/{printername}/{gcode}") @Produces(value="application/json") public MachineResponse executeGCode(@PathParam(value="printername") java.lang.String printerName, @PathParam(value="gcode") java.lang.String gcode)
@GET @Path(value="moveX/{printername}/{distance}") @Produces(value="application/json") public MachineResponse moveX(@PathParam(value="distance") java.lang.String dist, @PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="moveY/{printername}/{distance}") @Produces(value="application/json") public MachineResponse moveY(@PathParam(value="distance") java.lang.String dist, @PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="moveZ/{printername}/{distance}") @Produces(value="application/json") public MachineResponse moveZ(@PathParam(value="distance") java.lang.String dist, @PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="homeZ/{printername}") @Produces(value="application/json") public MachineResponse homeZ(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="homeX/{printername}") @Produces(value="application/json") public MachineResponse homeX(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="homeY/{printername}") @Produces(value="application/json") public MachineResponse homeY(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="motorsOff/{printername}") @Produces(value="application/json") public MachineResponse motorsOff(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="motorsOn/{printername}") @Produces(value="application/json") public MachineResponse motorsOn(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="startProjector/{printername}") @Produces(value="application/json") public MachineResponse startProjector(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="stopProjector/{printername}") @Produces(value="application/json") public MachineResponse stopProjector(@PathParam(value="printername") java.lang.String printerName)
@GET @Path(value="startJob/{fileName}/{printername}") @Produces(value="application/json") public MachineResponse print(@PathParam(value="fileName") java.lang.String fileName, @PathParam(value="printername") java.lang.String printername)
@POST @Path(value="testScript/{printername}/{scriptname}/{returnType}") @Produces(value="application/json") public TestingResult testScript(@PathParam(value="printername") java.lang.String printerName, @PathParam(value="scriptname") java.lang.String scriptName, java.lang.String javascript, @PathParam(value="returnType") java.lang.String expectedReturnTypeString) throws InappropriateDeviceException
InappropriateDeviceException
@POST @Path(value="testTemplate/{printername}/{templatename}") @Produces(value="application/json") public TestingResult testTemplate(@PathParam(value="printername") java.lang.String printerName, @PathParam(value="templatename") java.lang.String templateName, java.lang.String template) throws InappropriateDeviceException
InappropriateDeviceException
@GET @Path(value="remainingPrintMaterial/{printername}") @Produces(value="application/json") public MachineResponse getRemainingResin(@PathParam(value="printername") java.lang.String printerName) throws InappropriateDeviceException
InappropriateDeviceException