Class ElectronicJournalProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.electronicjournal.ElectronicJournalProperties
All Implemented Interfaces:
ElectronicJournalInterface, JposBaseInterface
Direct Known Subclasses:
ElectronicJournal

public class ElectronicJournalProperties extends JposCommonProperties implements ElectronicJournalInterface
Class containing the electronic journal specific properties, their default values and default implementations of ElectronicJournalInterface. For details about properties, methods and method parameters, see UPOS specification, chapter Electronic Journal.
  • Field Details

    • CapAddMarker

      public boolean CapAddMarker
      UPOS property CapAddMarker. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapErasableMedium

      public boolean CapErasableMedium
      UPOS property CapErasableMedium. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapInitializeMedium

      public boolean CapInitializeMedium
      UPOS property CapInitializeMedium. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapMediumIsAvailable

      public boolean CapMediumIsAvailable
      UPOS property CapMediumIsAvailable. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPrintContent

      public boolean CapPrintContent
      UPOS property CapPrintContent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPrintContentFile

      public boolean CapPrintContentFile
      UPOS property CapPrintContentFile. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRetrieveCurrentMarker

      public boolean CapRetrieveCurrentMarker
      UPOS property CapRetrieveCurrentMarker. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRetrieveMarker

      public boolean CapRetrieveMarker
      UPOS property CapRetrieveMarker. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRetrieveMarkerByDateTime

      public boolean CapRetrieveMarkerByDateTime
      UPOS property CapRetrieveMarkerByDateTime. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapRetrieveMarkersDateTime

      public boolean CapRetrieveMarkersDateTime
      UPOS property CapRetrieveMarkersDateTime. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapStation

      public int CapStation
      UPOS property CapStation. Default: S_RECEIPT. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapStorageEnabled

      public boolean CapStorageEnabled
      UPOS property CapStorageEnabled. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSuspendPrintContent

      public boolean CapSuspendPrintContent
      UPOS property CapSuspendPrintContent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapSuspendQueryContent

      public boolean CapSuspendQueryContent
      UPOS property CapSuspendQueryContent. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapWaterMark

      public boolean CapWaterMark
      UPOS property CapWaterMark. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MediumFreeSpaceDef

      public long MediumFreeSpaceDef
      Default value of MediumFreeSpace property. Default: 0. Must be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MediumFreeSpace

      public long MediumFreeSpace
      UPOS property MediumFreeSpace.
    • MediumIDDef

      public String MediumIDDef
      Default value of MediumID property. Default: "". Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MediumID

      public String MediumID
      UPOS property MediumID.
    • MediumIsAvailableDef

      public boolean MediumIsAvailableDef
      Default value of MediumIsAvailable property. Default: true. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MediumIsAvailable

      public boolean MediumIsAvailable
      UPOS property MediumIsAvailable.
    • MediumSizeDef

      public long MediumSizeDef
      Default value of MediumSize property. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MediumSize

      public long MediumSize
      UPOS property MediumSize.
    • Station

      public int Station
      UPOS property Station. Default: S_RECEIPT. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • StorageEnabled

      public boolean StorageEnabled
      UPOS property StorageEnabled.
    • Suspended

      public boolean Suspended
      UPOS property Suspended.
    • WaterMark

      public boolean WaterMark
      UPOS property WaterMark. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
  • Constructor Details

    • ElectronicJournalProperties

      public ElectronicJournalProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • initOnOpen

      public void initOnOpen()
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during open.
      Overrides:
      initOnOpen in class JposCommonProperties
    • initOnFirstEnable

      public boolean initOnFirstEnable()
      Description copied from class: JposCommonProperties
      Initialize properties that must be initialized whenever the device will be enabled the first time-
      Overrides:
      initOnFirstEnable in class JposCommonProperties
      Returns:
      Returns true in case of first enable.
    • initOnEnable

      public void initOnEnable(boolean enable)
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during deviceEnable.
      Overrides:
      initOnEnable in class JposCommonProperties
      Parameters:
      enable - True: initialize properties, false: do nothing
    • newJposOutputRequest

      public JposOutputRequest newJposOutputRequest()
      Description copied from interface: JposBaseInterface
      Class factory for JposOutputRequests.
      Specified by:
      newJposOutputRequest in interface JposBaseInterface
      Overrides:
      newJposOutputRequest in class JposCommonProperties
      Returns:
      A new instance of JposOutputRequest or a derived class.
    • clearInput

      public void clearInput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Clear input processing: Clear data event list, clear data event count, set State to idle. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • ExclusiveUse equals ExclusiveYes: Device is claimed.
      Specified by:
      clearInput in interface JposBaseInterface
      Overrides:
      clearInput in class JposCommonProperties
      Throws:
      jpos.JposException - See UPOS specification, method ClearInput
    • clearOutput

      public void clearOutput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Clear output processing. Removes all OutputCompleteEvents and ErrorEvents from event queue and sets State to S_IDLE. Clears all outstanding commands of the given property set as well. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • ExclusiveUse equals ExclusiveYes: Device is claimed.
      Specified by:
      clearOutput in interface JposBaseInterface
      Overrides:
      clearOutput in class JposCommonProperties
      Throws:
      jpos.JposException - See UPOS specification, method ClearOutput
    • retryOutput

      public void retryOutput()
      Description copied from interface: JposBaseInterface
      Initiates output retrieval. Must be overwritten in devices that support retrying output operations.
      Specified by:
      retryOutput in interface JposBaseInterface
      Overrides:
      retryOutput in class JposCommonProperties
    • retryInput

      public void retryInput()
      Description copied from interface: JposBaseInterface
      Initiates input retrieval. Must be overwritten in devices that support retrying input operation.
      Specified by:
      retryInput in interface JposBaseInterface
      Overrides:
      retryInput in class JposCommonProperties
    • station

      public void station(int station) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of setting Station. 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,
      • All bits set in station are set in CapStation as well,
      • internal property AllowAlwaysSetProperties is true or station equals the previous value of Station.
      Specified by:
      station in interface ElectronicJournalInterface
      Parameters:
      station - Station for subsequent storing data into journal.
      Throws:
      jpos.JposException - If an error occurs.
    • storageEnabled

      public void storageEnabled(boolean flag) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of setting StorageEnabled. 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,
      • CapStorageEnabled is true or flag is true.
      Specified by:
      storageEnabled in interface ElectronicJournalInterface
      Parameters:
      flag - New StorageEnabled value.
      Throws:
      jpos.JposException - If an error occurs.
    • waterMark

      public void waterMark(boolean flag) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of setting WaterMark. 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,
      • CapWaterMark is true or flag is false,
      • internal property AllowAlwaysSetProperties is true or flag equals the previous value of WaterMark.
      Specified by:
      waterMark in interface ElectronicJournalInterface
      Parameters:
      flag - New WaterMark value.
      Throws:
      jpos.JposException - If an error occurs.
    • addMarker

      public void addMarker(String marker) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of AddMarker method. 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,
      • CapAddMarker is true.
      Specified by:
      addMarker in interface ElectronicJournalInterface
      Parameters:
      marker - Marker identifier.
      Throws:
      jpos.JposException - If an error occurs.
    • eraseMedium

      public EraseMedium eraseMedium() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Validation part of EraseMedium method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapErasableMedium is true,
      • CapMediumIsAvailable is false or MediumIsAvailable is true.
      Specified by:
      eraseMedium in interface ElectronicJournalInterface
      Returns:
      EraseMedium object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • eraseMedium

      public void eraseMedium(EraseMedium request) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of EraseMedium method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a EraseMedium object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      eraseMedium in interface ElectronicJournalInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by EraseMedium.
      Throws:
      jpos.JposException - If an error occurs.
    • initializeMedium

      public InitializeMedium initializeMedium(String mediumID) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Validation part of InitializeMedium method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapInitializeMedium is true,
      • mediumID in not null.
      Specified by:
      initializeMedium in interface ElectronicJournalInterface
      Parameters:
      mediumID - Medium identifier.
      Returns:
      InitializeMedium object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • initializeMedium

      public void initializeMedium(InitializeMedium request) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of InitializeMedium method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a InitializeMedium object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      initializeMedium in interface ElectronicJournalInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by InitializeMedium.
      Throws:
      jpos.JposException - If an error occurs.
    • printContent

      public PrintContent printContent(String fromMarker, String toMarker) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Validation part of PrintContent method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrintContent is true,
      • Neither fromMarker nor toMarker is null.
      Specified by:
      printContent in interface ElectronicJournalInterface
      Parameters:
      fromMarker - Marker that marks start position of data to be printed.
      toMarker - Marker that marks end position of data to be printed.
      Returns:
      PrintContent object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printContent

      public void printContent(PrintContent request) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of PrintContent method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintContent object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      printContent in interface ElectronicJournalInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by PrintContent.
      Throws:
      jpos.JposException - If an error occurs.
    • printContentFile

      public PrintContentFile printContentFile(String fileName) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Validation part of PrintContentFile method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPrintContentFile is true,
      • fileName is not null.
      Specified by:
      printContentFile in interface ElectronicJournalInterface
      Parameters:
      fileName - Name of file that contains printing data.
      Returns:
      PrintContentFile object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • printContentFile

      public void printContentFile(PrintContentFile request) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of PrintContentFile method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintContentFile object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      printContentFile in interface ElectronicJournalInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by PrintContentFile.
      Throws:
      jpos.JposException - If an error occurs.
    • queryContent

      public QueryContent queryContent(String fileName, String fromMarker, String toMarker) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Validation part of QueryContent method. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • fileName is not null,
      • Neither fromMarker nor toMarker is null.
      Specified by:
      queryContent in interface ElectronicJournalInterface
      Parameters:
      fileName - Filename to be used to store queried contents.
      fromMarker - Name of lower bound marker.
      toMarker - Name of upper bound marker.
      Returns:
      QueryContent object for use in final part.
      Throws:
      jpos.JposException - If an error occurs.
    • queryContent

      public void queryContent(QueryContent request) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of QueryContent method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a QueryContent object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      Specified by:
      queryContent in interface ElectronicJournalInterface
      Parameters:
      request - Output request object returned by validation method that contains all parameters to be used by QueryContent.
      Throws:
      jpos.JposException - If an error occurs.
    • cancelPrintContent

      public void cancelPrintContent() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of CancelPrintContent method. 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,
      • CapSuspendPrintContent is true,
      • Suspended is true.
      Specified by:
      cancelPrintContent in interface ElectronicJournalInterface
      Throws:
      jpos.JposException - If an error occurs.
    • cancelQueryContent

      public void cancelQueryContent() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of CancelQueryContent method. 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,
      • CapSuspendQueryContent is true,
      • Suspended is true.
      Specified by:
      cancelQueryContent in interface ElectronicJournalInterface
      Throws:
      jpos.JposException - If an error occurs.
    • resumePrintContent

      public void resumePrintContent() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of ResumePrintContent method. 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,
      • CapSuspendPrintContent is true,
      • Suspended is true.
      Specified by:
      resumePrintContent in interface ElectronicJournalInterface
      Throws:
      jpos.JposException - If an error occurs.
    • resumeQueryContent

      public void resumeQueryContent() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of ResumeQueryContent method. 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,
      • CapSuspendQueryContent is true,
      • Suspended is true.
      Specified by:
      resumeQueryContent in interface ElectronicJournalInterface
      Throws:
      jpos.JposException - If an error occurs.
    • retrieveCurrentMarker

      public void retrieveCurrentMarker(int markerType, String[] marker) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of RetrieveCurrentMarker method. 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,
      • marker is a String array of length 1,
      • CapRetrieveCurrentMarker is true,
      • marterType is one of MT_SESSION_BEG, MT_SESSION_END, MT_DOCUMENT, MT_HEAD or MT_TAIL.
      Specified by:
      retrieveCurrentMarker in interface ElectronicJournalInterface
      Parameters:
      markerType - Specifies the type of the queried current marker.
      marker - Contains the return value, the implementation specific marker.
      Throws:
      jpos.JposException - If an error occurs.
    • retrieveMarker

      public void retrieveMarker(int markerType, int sessionNumber, int documentNumber, String[] marker) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of RetrieveMarker method. 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,
      • marker is a String array with length 1,
      • CapRetrieveMarker is true,
      • markerType is one of MT_SESSION_BEG, MT_SESSION_END or MT_DOCUMENT,
      • documentNumber is ≥ 0.
      Specified by:
      retrieveMarker in interface ElectronicJournalInterface
      Parameters:
      markerType - Specifies the type of the queried marker.
      sessionNumber - Contains the number of the session the marker is queried for.
      documentNumber - Contains the number of the document the marker is queried.
      marker - Contains the return value, the implementation specific marker.
      Throws:
      jpos.JposException - If an error occurs.
    • retrieveMarkerByDateTime

      public void retrieveMarkerByDateTime(int markerType, String dateTime, String markerNumber, String[] marker) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of RetrieveMarkerByDateTime method. 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,
      • Neither dateTime normarkerNumber is null,
      • marker is a String array of length 1,
      • CapRetrieveMarkerByDateTime is true,
      • markerType is one of MT_SESSION_BEG, MT_SESSION_END or MT_DOCUMENT,
      • dateTime consists of a valid date and - if present - a valid time,
      • markerNumber is numeric, the value is ≥ 1,
      Specified by:
      retrieveMarkerByDateTime in interface ElectronicJournalInterface
      Parameters:
      markerType - Specifies the type of the queried marker.
      dateTime - The date-time period the marker is queried for.
      markerNumber - The number of the marker which has to be queried.
      marker - Contains the return value, the implementation specific marker.
      Throws:
      jpos.JposException - If an error occurs.
    • retrieveMarkersDateTime

      public void retrieveMarkersDateTime(String marker, String[] dateTime) throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of RetrieveMarkersDateTime method. 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,
      • marker is not null,
      • dateTime is a String array of length 1,
      • CapRetrieveMarkersDateTime is true.
      Specified by:
      retrieveMarkersDateTime in interface ElectronicJournalInterface
      Parameters:
      marker - Specifies the marker for which the time has to be determined.
      dateTime - Contains the return value, the date and time string of the given marker.
      Throws:
      jpos.JposException - If an error occurs.
    • suspendPrintContent

      public void suspendPrintContent() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of SuspendPrintContent method. 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,
      • State is S_BUSY,
      • CapSuspendPrintContent is true,
      • Suspended is false.
      Specified by:
      suspendPrintContent in interface ElectronicJournalInterface
      Throws:
      jpos.JposException - If an error occurs.
    • suspendQueryContent

      public void suspendQueryContent() throws jpos.JposException
      Description copied from interface: ElectronicJournalInterface
      Final part of SuspendQueryContent method. 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,
      • State is S_BUSY,
      • CapSuspendQueryContent is true,
      • Suspended is false.
      Specified by:
      suspendQueryContent in interface ElectronicJournalInterface
      Throws:
      jpos.JposException - If an error occurs.