Class PrintRecPackageAdjustVoid
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
de.gmxhome.conrad.jpos.jpos_base.fiscalprinter.OutputRequest
de.gmxhome.conrad.jpos.jpos_base.fiscalprinter.PrintRecPackageAdjustVoid
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
PrintRecPackageAdjustment
Output request executor for FiscalPrinter method PrintRecPackageAdjustVoid and executor base for FiscalPrinterService method
PrintRecPackageAdjustment.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
JposOutputRequest.JposRequestThread
-
Field Summary
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.fiscalprinter.OutputRequest
Level, Station
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
Abort, AdditionalData, Device, EndSync, Exception, Finished, OutputID, Props, Waiting
-
Constructor Summary
ConstructorsConstructorDescriptionPrintRecPackageAdjustVoid(FiscalPrinterProperties props, int adjustmentType, String vatAdjustment)
Constructor.PrintRecPackageAdjustVoid(FiscalPrinterProperties props, int adjustmentType, String vatAdjustment, Map<Integer,Number> parsedAdjustments)
Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
FiscalPrinter method parameter adjustmentType, see method PrintRecPackageAdjustVoid.getAjustmentAmount(int i)
Retrieves adjustment amount of the specified pair.Returns contents of property PostLine at the time where this instance has been created.Returns contents of property PreLine at the time where this instance has been created.Deprecated.int
getVatID(int i)
Retrieves vat id of the specified pair.int
Returns number of VAT ID and adjustment amount pairs specified within VatAdjustment.void
invoke()
This function should be called whenever a printing method has been invoked.void
Invokes the command.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.fiscalprinter.OutputRequest
createErrorEvent, createIdleEvent, setIdleWaiter
Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposOutputRequest
abortCommand, abortCommand, catchedInvocation, clearAll, clearInput, clearOutput, countCommands, createOutputEvent, dequeue, enqueue, enqueueSynchronous, finishAsyncProcessing, finished, reactivate, reactivate, reset, run
-
Constructor Details
-
PrintRecPackageAdjustVoid
public PrintRecPackageAdjustVoid(FiscalPrinterProperties props, int adjustmentType, String vatAdjustment)Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.adjustmentType
- Type of adjustment.vatAdjustment
- String containing a list of adjustment(s) to be voided for different VAT(s).
-
PrintRecPackageAdjustVoid
public PrintRecPackageAdjustVoid(FiscalPrinterProperties props, int adjustmentType, String vatAdjustment, Map<Integer,Number> parsedAdjustments)Constructor. Stores given parameters for later use.- Parameters:
props
- Property set of device service.adjustmentType
- Type of 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
-
getAdjustmentType
public int getAdjustmentType()FiscalPrinter method parameter adjustmentType, see method PrintRecPackageAdjustVoid.- Returns:
- parameter adjustmentType.
-
getVatAdjustment
Deprecated.FiscalPrinter method parameter vatAdjustment, see method PrintRecPackageAdjustVoid.- Returns:
- parameter vatAdjustment.
-
getVatIDAmountCount
public int getVatIDAmountCount()Returns number of VAT ID and adjustment amount pairs specified within VatAdjustment. Even if VatAdjustment is still available, use getVatIDAmountCount, getVatID and getAdjustmentAmount instead to retrieve the adjustments per vat.- Returns:
- Number of pairs. If zero, deprecated constructor has been used to create this object and getVatAdjustment must be parsed to get vat IDs and amounts.
-
getVatID
public int getVatID(int i) throws jpos.JposExceptionRetrieves vat id of the specified pair.- Parameters:
i
- Pair index, a value between zero and getVatIDAmountCount() - 1.- Returns:
- Vat ID component of the specified pair.
- Throws:
jpos.JposException
- If the index is outside the valid range.
-
getAjustmentAmount
Retrieves adjustment amount of the specified pair.- Parameters:
i
- Pair index, a value between zero and getVatIDAmountCount() - 1.- Returns:
- adjustment amount component of the specified pair.
- Throws:
jpos.JposException
- If the index is outside the valid range.
-
invokeMethod
public void invokeMethod() throws jpos.JposExceptionInvokes 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.- Throws:
jpos.JposException
- FiscalPrinterException thrown by the command to be executed.
-
getPostLine
Returns contents of property PostLine at the time where this instance has been created.- Returns:
- Contents of PostLine during request creation.
-
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.JposExceptionDescription 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 classOutputRequest
- Throws:
jpos.JposException
- If the invoked method throws an exception.
-