barcode4j 2.1.0

org.krysalis.barcode4j.servlet
Class BarcodeServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.krysalis.barcode4j.servlet.BarcodeServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class BarcodeServlet
extends javax.servlet.http.HttpServlet

Simple barcode servlet.

Version:
$Id: BarcodeServlet.java,v 1.8 2010/10/05 06:53:56 jmaerki Exp $
See Also:
Serialized Form

Field Summary
static java.lang.String BARCODE_FORMAT
          Parameter name for the output format
static java.lang.String BARCODE_HEIGHT
          Parameter name for the barcode height
static java.lang.String BARCODE_HUMAN_READABLE_FONT
          Parameter name for the font name of the human readable display
static java.lang.String BARCODE_HUMAN_READABLE_PATTERN
          Parameter name for the pattern to format the human readable message
static java.lang.String BARCODE_HUMAN_READABLE_POS
          Parameter name for the human-readable placement
static java.lang.String BARCODE_HUMAN_READABLE_SIZE
          Parameter name for the font size of the human readable display
static java.lang.String BARCODE_IMAGE_GRAYSCALE
          Parameter name for the grayscale or b/w image (for bitmaps)
static java.lang.String BARCODE_IMAGE_RESOLUTION
          Parameter name for the image resolution (for bitmaps)
static java.lang.String BARCODE_MODULE_WIDTH
          Parameter name for the module width
static java.lang.String BARCODE_MSG
          Parameter name for the message
static java.lang.String BARCODE_QUIET_ZONE
          Parameter name for the quiet zone
static java.lang.String BARCODE_TYPE
          Parameter name for the barcode type
static java.lang.String BARCODE_WIDE_FACTOR
          Parameter name for the wide factor
 
Constructor Summary
BarcodeServlet()
           
 
Method Summary
protected  org.apache.avalon.framework.configuration.Configuration buildCfg(javax.servlet.http.HttpServletRequest request)
          Build an Avalon Configuration object from the request.
protected  java.lang.String determineFormat(javax.servlet.http.HttpServletRequest request)
          Check the request for the desired output format.
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BARCODE_MSG

public static final java.lang.String BARCODE_MSG
Parameter name for the message

See Also:
Constant Field Values

BARCODE_TYPE

public static final java.lang.String BARCODE_TYPE
Parameter name for the barcode type

See Also:
Constant Field Values

BARCODE_HEIGHT

public static final java.lang.String BARCODE_HEIGHT
Parameter name for the barcode height

See Also:
Constant Field Values

BARCODE_MODULE_WIDTH

public static final java.lang.String BARCODE_MODULE_WIDTH
Parameter name for the module width

See Also:
Constant Field Values

BARCODE_WIDE_FACTOR

public static final java.lang.String BARCODE_WIDE_FACTOR
Parameter name for the wide factor

See Also:
Constant Field Values

BARCODE_QUIET_ZONE

public static final java.lang.String BARCODE_QUIET_ZONE
Parameter name for the quiet zone

See Also:
Constant Field Values

BARCODE_HUMAN_READABLE_POS

public static final java.lang.String BARCODE_HUMAN_READABLE_POS
Parameter name for the human-readable placement

See Also:
Constant Field Values

BARCODE_FORMAT

public static final java.lang.String BARCODE_FORMAT
Parameter name for the output format

See Also:
Constant Field Values

BARCODE_IMAGE_RESOLUTION

public static final java.lang.String BARCODE_IMAGE_RESOLUTION
Parameter name for the image resolution (for bitmaps)

See Also:
Constant Field Values

BARCODE_IMAGE_GRAYSCALE

public static final java.lang.String BARCODE_IMAGE_GRAYSCALE
Parameter name for the grayscale or b/w image (for bitmaps)

See Also:
Constant Field Values

BARCODE_HUMAN_READABLE_SIZE

public static final java.lang.String BARCODE_HUMAN_READABLE_SIZE
Parameter name for the font size of the human readable display

See Also:
Constant Field Values

BARCODE_HUMAN_READABLE_FONT

public static final java.lang.String BARCODE_HUMAN_READABLE_FONT
Parameter name for the font name of the human readable display

See Also:
Constant Field Values

BARCODE_HUMAN_READABLE_PATTERN

public static final java.lang.String BARCODE_HUMAN_READABLE_PATTERN
Parameter name for the pattern to format the human readable message

See Also:
Constant Field Values
Constructor Detail

BarcodeServlet

public BarcodeServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
HttpServlet.doGet(HttpServletRequest, HttpServletResponse)

determineFormat

protected java.lang.String determineFormat(javax.servlet.http.HttpServletRequest request)
Check the request for the desired output format.

Parameters:
request - the request to use
Returns:
MIME type of the desired output format.

buildCfg

protected org.apache.avalon.framework.configuration.Configuration buildCfg(javax.servlet.http.HttpServletRequest request)
Build an Avalon Configuration object from the request.

Parameters:
request - the request to use
Returns:
the newly built COnfiguration object
TODO:
Change to bean API

barcode4j 2.1.0

Copyright © 2000-2010 Jeremias Maerki. All rights reserved.