Class BarcodeHelper

java.lang.Object
de.elo.mover.main.helper.BarcodeHelper

public class BarcodeHelper extends Object

Überschrift: BarcodeHelper.

Beschreibung: Hilfsklasse für die Barcode-Funktionalität. Für die Methoden dieser Klasse kann nur begrenzter Support geleistet werden.

Copyright: Copyright (c) ELO Digital Office GmbH 2018 - 2022

  • Constructor Details

    • BarcodeHelper

      public BarcodeHelper()
  • Method Details

    • getEncodeHintTypes

      public static HashMap<com.google.zxing.EncodeHintType,Object> getEncodeHintTypes(String barcodeConfig)
      Liefert die Liste mit den Barcode-Einstellungen zurück. Bei einer ungültigen Eingabe wird null zurückgeliefert.
      Parameters:
      barcodeConfig - Barcode-Konfiguration als String
      Returns:
      Liste mit den Barcode-Einstellungen
    • getDecodeHintTypes

      public static Map<com.google.zxing.DecodeHintType,Object> getDecodeHintTypes(String barcodeConfig)
      Liefert eine Map mit den Barcode-Einstellungen oder null zurück.
      Parameters:
      barcodeConfig - Barcode-Einstellungen als eine Zeichenkette. Die einzelnen Einstellungen werden durch das Pipe-Symbol getrennt: "POSSIBLE_FORMATS:CODE_128,QR_CODE|CHARACTER_SET:UTF8|PURE_BARCODE:TRUE"
      Returns:
      Map mit den Barcode-Einstellungen
    • getBarcodeFormat

      public static com.google.zxing.BarcodeFormat getBarcodeFormat(String barFormatPart)
      Liefert den Barcode-Format zurück.
      Parameters:
      barFormatPart - Barcode-Format als String
      Returns:
      Barcode-Format
    • hasBarcodeLicense

      public static boolean hasBarcodeLicense(IXconnect ixConnect) throws Exception
      Meldet zurück, ob eine Barcode Lizenz in der angegebenen Index Server Verbindung vorhanden ist.
      Parameters:
      ixConnect - Indexserver-Verbindung
      Returns:
      Barcode Lizenz ist vorhanden
      Throws:
      Exception
    • getBarcode

      public static String getBarcode(IXconnect ixConnect, BufferedImage image, String barcodeConfig) throws com.google.zxing.NotFoundException, com.google.zxing.ChecksumException, com.google.zxing.FormatException, Exception
      Meldet zurück, ob das angegebene Image ein Barcode enthält.
      Parameters:
      ixConnect - Indexserver-Verbindung
      image - Image
      barcodeConfig - Barcode-Konfiguration
      Returns:
      Barcode-Information
      Throws:
      com.google.zxing.NotFoundException
      com.google.zxing.ChecksumException
      com.google.zxing.FormatException
      Exception
    • getBarcodeResult

      public static com.google.zxing.Result getBarcodeResult(IXconnect ixConnect, BufferedImage image, String barcodeConfig) throws com.google.zxing.NotFoundException, com.google.zxing.ChecksumException, com.google.zxing.FormatException, Exception
      Meldet zurück, ob das angegebene Image Barcodes enthält.
      Parameters:
      ixConnect - Indexserver-Verbindung
      image - Image
      barcodeConfig - Barcode-Konfiguration
      Returns:
      Barcode-Information
      Throws:
      com.google.zxing.NotFoundException
      com.google.zxing.ChecksumException
      com.google.zxing.FormatException
      Exception
    • writeBarcode

      public static void writeBarcode(IXconnect ixConnect, File targetFile, String barcodeText, String barcodeFormat, int width, int height, String barcodeConfig) throws Exception
      Schreibt die Barcodeinformationen in der angegebenen Datei.
      Parameters:
      ixConnect - Verbindung zum IndexServer
      targetFile - Datei, in der die Barcodeinformationen geschrieben werden
      barcodeText - Text, der als Barcode geschrieben wird
      barcodeFormat - Barcode-Format
      width - Barcode-Breite
      height - Barcode-Höhe
      barcodeConfig - Barcode-Konfiguration
      Throws:
      Exception
    • writeBarcode

      public static void writeBarcode(IXconnect ixConnect, File targetFile, String barcodeText, String barcodeFormat, int width, int height, int xPos, int yPos, String barcodeConfig) throws Exception
      Schreibt die Barcodeinformationen in der angegebenen Datei.
      Parameters:
      ixConnect - Verbindung zum IndexServer
      targetFile - Datei, in der die Barcodeinformationen geschrieben werden
      barcodeText - Text, der als Barcode geschrieben wird
      barcodeFormat - Barcode-Format
      width - Barcode-Breite
      height - Barcode-Höhe
      xPos - Horizontale Barcode-Position
      yPos - Vertikale Barcode-Position
      barcodeConfig - Barcode-Konfiguration
      Throws:
      Exception
    • setIxConnect

      public static void setIxConnect(IXconnect ixConnect)
      Setzt die angegegebene Indexserver-Verbindung.
      Parameters:
      ixConnect - Indexserver-Verbindung
    • createBarcodeReader

      public static BarcodeReader createBarcodeReader(String barcodeRulesDescr) throws Exception
      Erzeugt ein Objekt für die Barcode-Erkennung.
      Parameters:
      barcodeRulesDescr - Definition der Barcode-Regeln
      Returns:
      Barcode-Reader
      Throws:
      Exception
    • createBarcodeReader

      public static BarcodeReader createBarcodeReader() throws Exception
      Erzeugt ein Objekt für die Barcode-Erkennung.
      Returns:
      Barcode-Reader
      Throws:
      Exception
    • createBarcodeReader2

      public static BarcodeReader createBarcodeReader2(IXconnect currIxConnect) throws Exception
      Erzeugt ein Objekt für die Barcode-Erkennung.
      Parameters:
      currIxConnect - Indexserver-Verbindung
      Returns:
      BarcodeReader
      Throws:
      Exception