Interface PointCardRWInterface

All Superinterfaces:
JposBaseInterface
All Known Implementing Classes:
PointCardRWProperties

public interface PointCardRWInterface extends JposBaseInterface
Interface for methods that implement property setter and method calls for the PointCardRW device category. For details about properties, methods and method parameters, see UPOS specification, chapter Point Card Reader / Writer. Further details about error handling can be found in introduction - Device Behavior Models - Errors.
  • Method Details

    • characterSet

      void characterSet(int code) throws jpos.JposException
      Final part of setting CharacterSet. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrint is true,
      • code equals one of the values specified in CharacterSetList.
      Parameters:
      code - New CharacterSet value
      Throws:
      jpos.JposException - If an error occurs
    • lineChars

      void lineChars(int chars) throws jpos.JposException
      Final part of setting LineChars. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrint is true,
      • chars is above zero but not above the maximum of all values specified in LineCharsList.
      Parameters:
      chars - New LineChars value
      Throws:
      jpos.JposException - If an error occurs
    • lineHeight

      void lineHeight(int height) throws jpos.JposException
      Final part of setting LineHeight. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrint is true,
      • height is above zero.
      Parameters:
      height - New LineHeight value
      Throws:
      jpos.JposException - If an error occurs
    • lineSpacing

      void lineSpacing(int spacing) throws jpos.JposException
      Final part of setting LineSpacing. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrint is true,
      • spacing is above zero.
      Parameters:
      spacing - New LineSpacing value
      Throws:
      jpos.JposException - If an error occurs
    • mapCharacterSet

      void mapCharacterSet(boolean flag) throws jpos.JposException
      Final part of setting MapCharacterSet. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrint is true,
      • CapMapCharacterSet is true or flag is false.
      Parameters:
      flag - New MapCharacterSet value
      Throws:
      jpos.JposException - If an error occurs
    • mapMode

      void mapMode(int mode) throws jpos.JposException
      Final part of setting MapMode. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • mode is one of MM_DOTS, MM_TWIPS, MM_ENGLISH and MM_METRIC.
      Keep in mind: Even if MapMode can be set to one of the predefined values, it will be ignored if CapPrintMode is false.
      Parameters:
      mode - New MapMode value
      Throws:
      jpos.JposException - If an error occurs
    • tracksToRead

      void tracksToRead(int tracks) throws jpos.JposException
      Final part of setting TracksToRead. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Only tracks that have been specified in CapTracksToRead are specified in tracks.
      Parameters:
      tracks - New TracksToRead value
      Throws:
      jpos.JposException - If an error occurs
    • tracksToWrite

      void tracksToWrite(int tracks) throws jpos.JposException
      Final part of setting TracksToWrite. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Only tracks that have been specified in CapTracksToWrite are specified in tracks.
      Parameters:
      tracks - New TracksToWrite value
      Throws:
      jpos.JposException - If an error occurs
    • write1Data

      void write1Data(String trackdata) throws jpos.JposException
      Final part of setting Write1Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Bit PCRW_TRACK1 is set in TracksToWrite.
      Parameters:
      trackdata - New Write1Data value
      Throws:
      jpos.JposException - If an error occurs
    • write2Data

      void write2Data(String trackdata) throws jpos.JposException
      Final part of setting Write2Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Bit PCRW_TRACK2 is set in TracksToWrite.
      Parameters:
      trackdata - New Write2Data value
      Throws:
      jpos.JposException - If an error occurs
    • write3Data

      void write3Data(String trackdata) throws jpos.JposException
      Final part of setting Write3Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Bit PCRW_TRACK3 is set in TracksToWrite.
      Parameters:
      trackdata - New Write3Data value
      Throws:
      jpos.JposException - If an error occurs
    • write4Data

      void write4Data(String trackdata) throws jpos.JposException
      Final part of setting Write4Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Bit PCRW_TRACK4 is set in TracksToWrite.
      Parameters:
      trackdata - New Write4Data value
      Throws:
      jpos.JposException - If an error occurs
    • write5Data

      void write5Data(String trackdata) throws jpos.JposException
      Final part of setting Write5Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Bit PCRW_TRACK5 is set in TracksToWrite.
      Parameters:
      trackdata - New Write5Data value
      Throws:
      jpos.JposException - If an error occurs
    • write6Data

      void write6Data(String trackdata) throws jpos.JposException
      Final part of setting Write6Data. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Bit PCRW_TRACK6 is set in TracksToWrite.
      Parameters:
      trackdata - New Write6Data value
      Throws:
      jpos.JposException - If an error occurs
    • beginInsertion

      void beginInsertion(int timeout) throws jpos.JposException
      Final part of BeginInsertion method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • No asynchronous output is in progress,
      • timeout is above zero or FOREVER.
      Parameters:
      timeout - Maximum time to wait for card insertion.
      Throws:
      jpos.JposException - If an error occurs.
    • beginRemoval

      void beginRemoval(int timeout) throws jpos.JposException
      Final part of BeginRemoval method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • No asynchronous output is in progress,
      • timeout is above zero or FOREVER.
      Parameters:
      timeout - Maximum time to wait for card insertion.
      Throws:
      jpos.JposException - If an error occurs.
    • cleanCard

      void cleanCard() throws jpos.JposException
      Final part of DestroyWindow method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapCleanCard is true.
      Throws:
      jpos.JposException - If an error occurs.
    • clearPrintWrite

      void clearPrintWrite(int kind, int hposition, int vposition, int width, int height) throws jpos.JposException
      Final part of ClearPrintWrite method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • No asynchronous output is in progress,
      • kind is 1, 2 or 3,
      • if kind is 1 or 3:
        • CapClearPrint is true,
        • hposition and vposition are positive values,
        • width and height are above -2.
      Parameters:
      kind - Parts of the point card that will be cleared. See UPOS specification.
      hposition - The horizontal start position for erasing the printing area.
      vposition - The vertical start position for erasing the printing area.
      width - The width used for erasing the printing area.
      height - The height used for erasing the printing area.
      Throws:
      jpos.JposException - If an error occurs.
    • endInsertion

      void endInsertion() throws jpos.JposException
      Final part of EndInsertion method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled.
      Throws:
      jpos.JposException - If an error occurs.
    • endRemoval

      void endRemoval() throws jpos.JposException
      Final part of EndRemoval method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled.
      Throws:
      jpos.JposException - If an error occurs.
    • rotatePrint

      void rotatePrint(int rotation) throws jpos.JposException
      Final part of RotatePrint method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrint is true,
      • rotation is one of RP_NORMAL, RP_RIGHT90, RP_LEFT90 and RP_ROTATE180,
      • The corresponding capability, CapRight90, CapLeft90 or CapRotate180, is true.
      Parameters:
      rotation - Requested rotation.
      Throws:
      jpos.JposException - If an error occurs.
    • validateData

      void validateData(String data) throws jpos.JposException
      Final part of DestroyWindow method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • No asynchronous output is in progress,
      • CapPrint is true.
      This method can throw a JposException with ErrorCode = 0 to signal that full validity check has token place. If it does not throw a JposException, method PointCardRWService.outputDataParts will be used to parse data and split it into a list of PointCardRWService.PrintDataPart objects. Afterwards, method PointCardRWService.plausibilityCheckData will be used to check the validity of all objects returned.
      The service developer has the choice:
      • data can be parsed to check whether whether parts are valid or contain conditions that require to throw a JposException with ErrorCode E_ILLEGAL or E_FAILURE and if not, to throw a JposException with ErrorCode 0. In this case, the other validateData methods should not be overriden.
      • This method performs nothing. In that case, validation occurs for each escape sequence via the corresponding validateData method, and the other validation routines must be implemented if the default behavior do not match the needs.
      Parameters:
      data - Print data to be checked for validity.
      Throws:
      jpos.JposException - If an error occurs.
    • printWrite

      PrintWrite printWrite(int kind, int hposition, int vposition, String data) throws jpos.JposException
      Validation part of PrintWrite method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • kind is 1, 2 or 3,
      • if kind is 1 or 3:
        • CapPrint is true,
        • hposition and vposition are positive values.
      • if kind is 2 or 3:
        • Property TracksToWrite contains only tracks that are contained in CapTracksToWrite as well,
        • The corresponding WritexData properties are not empty strings.
      Parameters:
      kind - Parts of the point card that will be written or printed. See UPOS specification.
      hposition - The horizontal start position for printing.
      vposition - The vertical start position for printing.
      data - Print data.
      Returns:
      PrintWrite object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printWrite

      void printWrite(PrintWrite request) throws jpos.JposException
      Final part of PrintWrite method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintWrite object. This method will be performed asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      If this method performs a write operation, it must set the write status of each track via method setWriteState of the give request to ensure that property WriteState1 and WriteState2 will be set correctly in error case. Otherwise, the status of all tracks specified via TracksToWrite will be set to SUCCESS on success and to E_FAILURE on failure.
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by PrintWrite.
      Throws:
      jpos.JposException - If an error occurs.
    • validateData

      void validateData(PointCardRWService.EscUnknown printData) throws jpos.JposException
      Validate unknown sequence. Default is no support. If a device supports further sequences, this method must be overwritten. The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      Parameters:
      printData - EscUnknown object containing the sequence attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.PrintData printData) throws jpos.JposException
      Validate printable character sequence. ESC sequences have been filtered out. Default behavior is that all other characters with character code ≤ 0x20 are invalid. If a service should support more characters, this method must be overwritten.
      The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      Parameters:
      printData - Data to be printed.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscEmbedded escEmbedded) throws jpos.JposException
      Validate embedded data sequence. For details, see UPOS specification of ESC|#E. Default behavior is that the given sequence is valid. The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      Parameters:
      escEmbedded - EscEmbedded object containing sequence attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscFontTypeface escFontTypeface) throws jpos.JposException
      Validate font typeface selection sequence. For details, see UPOS specification of ESC|#fT. Default behavior is to support all type fonts specified in FontTypefaceList. The following plausibility checks will be made before this method will be called:
      • CapPrint is true,
      • EscFontTypeface attribute is between 0 and the number of type face names specified in FontTypefaceList.
      Parameters:
      escFontTypeface - EscFontTypeface object containing the sequence attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscAlignment escAlignment) throws jpos.JposException
      Validate alignment sequence. For details, see UPOS specification of ESC|xA. Default behavior is that the service supports centered and right aligned text. The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      Parameters:
      escAlignment - EscAlignment object that contains the sequence attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscNormalize escNormalize) throws jpos.JposException
      Validate normalize escape sequence. For details, see UPOS specification of ESC|N. Should always be valid. Can be overwritten by service implementations. The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      Parameters:
      escNormalize - EscNormalize object containing the sequence attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscSimple escSimple) throws jpos.JposException
      Validate attribute setting sequences. For details, see UPOS specification for ESC|bC, ESC|iC and ESC|rvC. The default behavior is that reverse video is not supported. If a printer supports these attributes, this method must be overwritten.
      The following plausibility checks will be made before this method will be called:
      • CapPrint is true,
      • If EscSimple attribute Bold is true, CapBold is true,
      • If EscSimple attribute Italic is true, CapItalic is true.
      Parameters:
      escSimple - Object holding data of simple esc sequence
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscUnderline escUnderline) throws jpos.JposException
      Validate combined underline printing sequence. For details, see UPOS specification for ESC|[#]uC. Default behavior is support for thickness of 1 dot for underline only. If a service does not support underline or supports another thickness, this method must be overwritten. The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      Parameters:
      escUnderline - EscUnderline object containing the sequence attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.
    • validateData

      void validateData(PointCardRWService.EscScale escScale) throws jpos.JposException
      Validate print scale sequence. For details, see UPOS specification for ESC|xC, ESC|#hC or ESC|#vC. Default behavior is only support for scale = 1 and 2 if the corresponding capabilities for width and height of the specified station are true. If a service supports more scales, this method must be overwritten. The following plausibility checks will be made before this method will be called:
      • CapPrint is true.
      • If EscScale attribute ScaleValue is above 1, CapDhigh, CapDwide or CapDwideDhigh is true if the corresponding EscScale attribute(s) ScaleHorizontal and / or ScaleVertical is / are true.
      Parameters:
      escScale - EscScale object that holds the sequence specific attributes.
      Throws:
      jpos.JposException - For details, see UPOS method ValidateData.