Package com.logicaldoc.barcode
Class BarcodeManager
- java.lang.Object
-
- com.logicaldoc.barcode.BarcodeManager
-
public class BarcodeManager extends Object
Utility methods for barcodes- Since:
- 8.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description BarcodeManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Barcode>extract(com.logicaldoc.core.document.Document doc, Collection<String> possibleFormats)Extracts the barcodes from the given documentList<Barcode>extract(File file, String tenant, Collection<String> possibleFormats)List<Barcode>extractBarcodes(BufferedImage image, String tenant, Collection<String> possibleFormats)Recognizes all the barcodes inside the given image.List<Barcode>extractBarcodes(File imageFile, String tenant)List<Barcode>extractBarcodes(File imageFile, String tenant, Collection<String> possibleFormats)Recognizes all the barcodes in the given image file.List<Barcode>extractPDFBarcodes(File pdffile, String tenant)List<Barcode>extractPDFBarcodes(File pdffile, String tenant, Collection<String> possibleFormats)Recognizes all the barcodes in the given PDF filevoidprocessDocument(com.logicaldoc.core.document.Document doc, com.logicaldoc.core.document.DocumentHistory transaction, org.slf4j.Logger log)voidsetBarcodeTemplateDao(BarcodeTemplateDAO barcodeTemplateDao)voidsetConfig(com.logicaldoc.util.config.ContextProperties config)voidsetConverterManager(com.logicaldoc.core.conversion.FormatConverterManager converterManager)voidsetDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager)voidsetStorer(com.logicaldoc.core.store.Storer storer)voidsetTenantDao(com.logicaldoc.core.security.dao.TenantDAO tenantDao)
-
-
-
Method Detail
-
extract
public List<Barcode> extract(com.logicaldoc.core.document.Document doc, Collection<String> possibleFormats) throws IOException
Extracts the barcodes from the given document- Parameters:
doc- the document to processpossibleFormats- list of admitted barcode formats- Returns:
- the list of extracted barcodes
- Throws:
IOException- a generic error during the processing
-
extract
public List<Barcode> extract(File file, String tenant, Collection<String> possibleFormats) throws IOException
- Throws:
IOException
-
processDocument
public void processDocument(com.logicaldoc.core.document.Document doc, com.logicaldoc.core.document.DocumentHistory transaction, org.slf4j.Logger log) throws Exception- Throws:
Exception
-
extractBarcodes
public List<Barcode> extractBarcodes(BufferedImage image, String tenant, Collection<String> possibleFormats)
Recognizes all the barcodes inside the given image. The order is up-down, left-right- Parameters:
image- the image to processtenant- name of the tenantpossibleFormats- list of possible barcode formats- Returns:
- the list of extracted barcodes
-
extractBarcodes
public List<Barcode> extractBarcodes(File imageFile, String tenant, Collection<String> possibleFormats)
Recognizes all the barcodes in the given image file.- Parameters:
imageFile- The image file to readtenant- name of the tenantpossibleFormats- Collection of admitted barcode formats- Returns:
- Ordered list of barcodes (up to bottom and left to right)
-
extractPDFBarcodes
public List<Barcode> extractPDFBarcodes(File pdffile, String tenant, Collection<String> possibleFormats)
Recognizes all the barcodes in the given PDF file- Parameters:
pdffile- the pdf file to readtenant- name of the tenantpossibleFormats- collection of admitted barcode formats- Returns:
- ordered list of barcodes (up to bottom and left to right)
-
setConfig
public void setConfig(com.logicaldoc.util.config.ContextProperties config)
-
setStorer
public void setStorer(com.logicaldoc.core.store.Storer storer)
-
setTenantDao
public void setTenantDao(com.logicaldoc.core.security.dao.TenantDAO tenantDao)
-
setConverterManager
public void setConverterManager(com.logicaldoc.core.conversion.FormatConverterManager converterManager)
-
setBarcodeTemplateDao
public void setBarcodeTemplateDao(BarcodeTemplateDAO barcodeTemplateDao)
-
setDocumentManager
public void setDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager)
-
-