Class PrintRecPackageAdjustment

All Implemented Interfaces:
Runnable

public class PrintRecPackageAdjustment extends PrintRecPackageAdjustVoid
Output request executor for FiscalPrinter method PrintRecPackageAdjustment.
  • Constructor Details

    • PrintRecPackageAdjustment

      public PrintRecPackageAdjustment(FiscalPrinterProperties props, int adjustmentType, String description, String vatAdjustment)
      Constructor. Stores given parameters for later use.
      Parameters:
      props - Property set of device service.
      adjustmentType - Type of adjustment.
      description - Text describing the adjustment.
      vatAdjustment - String containing a list of adjustment(s) to be voided for different VAT(s).
    • PrintRecPackageAdjustment

      public PrintRecPackageAdjustment(FiscalPrinterProperties props, int adjustmentType, String description, String vatAdjustment, Map<Integer,​Number> parsedAdjustments)
      Constructor. Stores given parameters for later use.
      Parameters:
      props - Property set of device service.
      adjustmentType - Type of adjustment.
      description - Text describing the adjustment.
      vatAdjustment - String containing a list of adjustment(s) to be voided for different VAT(s).
      parsedAdjustments - parsed vatAdjustment, contains the adjustment amounts with the corresponding vat id as key specified in vatAdjustment.
  • Method Details

    • getDescription

      public String getDescription()
      FiscalPrinter method parameter description, see method PrintRecPackageAdjustment.
      Returns:
      parameter description.
    • invokeMethod

      public void invokeMethod() throws jpos.JposException
      Invokes the command. Must be implemented in derived class. Calls finished() to wake up potentially waiting threads.
      Replacement for invoke in derived classes. Should neither call super.invoke nor super.invokeMethod in derived classes because the calling method just calls super.invoke.
      Overrides:
      invokeMethod in class PrintRecPackageAdjustVoid
      Throws:
      jpos.JposException - FiscalPrinterException thrown by the command to be executed.
    • getPostLine

      public String getPostLine()
      Returns contents of property PostLine at the time where this instance has been created.
      Returns:
      Contents of PostLine during request creation.
    • getPreLine

      public String getPreLine()
      Returns contents of property PreLine at the time where this instance has been created.
      Returns:
      Contents of PreLine during request creation.
    • invoke

      public void invoke() throws jpos.JposException
      Description copied from class: OutputRequest
      This function should be called whenever a printing method has been invoked. Therefore, it is the perfect place to signal processing has finished to implicitly waiting synchronous methods.
      Overrides:
      invoke in class OutputRequest
      Throws:
      jpos.JposException - If the invoked method throws an exception.