org.w3c.tidy.servlet.properties
Class JTidyServletProperties

java.lang.Object
  extended byorg.w3c.tidy.servlet.properties.JTidyServletProperties

public class JTidyServletProperties
extends java.lang.Object

Version:
$Revision: 1.5 $ ($Author: fgiust $)
Author:
Vlad Skarzhevskyy skarzhevskyy@gmail.com

Field Summary
static java.lang.String DEFAULT_FILENAME
          name of the default properties file JTidyServlet.properties.
static java.lang.String JTIDYSERVLET_URI
          property JTidyServletURI.
static java.lang.String PROPERTY_BOOLEAN_XHTML
          property xhtml.
static java.lang.String PROPERTY_CLASS_REPOSITORYFACTORY
          property repositoryFactory.class.
static java.lang.String PROPERTY_INT_IMAGEGETTIMEOUT
          property imageGetTimeout.
static java.lang.String PROPERTY_STRING_IMAGE_HEIGHT
          property imageHeight.
static java.lang.String PROPERTY_STRING_IMAGE_WIDTH
          property imageWidth.
static java.lang.String PROPERTY_STRING_IMAGENAMEEXTENSION
          property imageNameExtension.
static java.lang.String PROPERTY_STRING_IMAGENAMEPREFIX
          property imageNamePrefix.
 
Method Summary
 boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
          Reads a boolean property.
static JTidyServletProperties getInstance()
           
 int getIntProperty(java.lang.String key, int defaultValue)
          Reads an int property.
 java.lang.String getProperty(java.lang.String key)
          Reads a String property.
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Reads a String property.
 RepositoryFactory getRepositoryFactoryInstance()
          Returns an instance of configured RepositoryFactory.
 ResponseRecordRepository getRepositoryInstance(javax.servlet.http.HttpSession httpSession)
          Returns an instance of configured ResponseRecordRepository.
 void loadFile(java.lang.String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILENAME

public static final java.lang.String DEFAULT_FILENAME
name of the default properties file JTidyServlet.properties.

See Also:
Constant Field Values

PROPERTY_CLASS_REPOSITORYFACTORY

public static final java.lang.String PROPERTY_CLASS_REPOSITORYFACTORY
property repositoryFactory.class.

See Also:
Constant Field Values

PROPERTY_STRING_IMAGENAMEPREFIX

public static final java.lang.String PROPERTY_STRING_IMAGENAMEPREFIX
property imageNamePrefix.

See Also:
Constant Field Values

PROPERTY_STRING_IMAGENAMEEXTENSION

public static final java.lang.String PROPERTY_STRING_IMAGENAMEEXTENSION
property imageNameExtension.

See Also:
Constant Field Values

PROPERTY_STRING_IMAGE_WIDTH

public static final java.lang.String PROPERTY_STRING_IMAGE_WIDTH
property imageWidth.

See Also:
Constant Field Values

PROPERTY_STRING_IMAGE_HEIGHT

public static final java.lang.String PROPERTY_STRING_IMAGE_HEIGHT
property imageHeight.

See Also:
Constant Field Values

PROPERTY_INT_IMAGEGETTIMEOUT

public static final java.lang.String PROPERTY_INT_IMAGEGETTIMEOUT
property imageGetTimeout.

See Also:
Constant Field Values

JTIDYSERVLET_URI

public static final java.lang.String JTIDYSERVLET_URI
property JTidyServletURI.

See Also:
Constant Field Values

PROPERTY_BOOLEAN_XHTML

public static final java.lang.String PROPERTY_BOOLEAN_XHTML
property xhtml.

See Also:
Constant Field Values
Method Detail

loadFile

public void loadFile(java.lang.String fileName)

getInstance

public static JTidyServletProperties getInstance()

getProperty

public java.lang.String getProperty(java.lang.String key)
Reads a String property.

Parameters:
key - property name
Returns:
property value or null if property is not found

getProperty

public java.lang.String getProperty(java.lang.String key,
                                    java.lang.String defaultValue)
Reads a String property.

Parameters:
key - property name
defaultValue - default value returned if property is not found value
Returns:
property value

getIntProperty

public int getIntProperty(java.lang.String key,
                          int defaultValue)
Reads an int property.

Parameters:
key - property name
defaultValue - default value returned if property is not found or not a valid int value
Returns:
property value

getBooleanProperty

public boolean getBooleanProperty(java.lang.String key,
                                  boolean defaultValue)
Reads a boolean property.

Parameters:
key - property name
defaultValue - default value returned if property is not found or not a valid boolean value
Returns:
property value

getRepositoryFactoryInstance

public RepositoryFactory getRepositoryFactoryInstance()
Returns an instance of configured RepositoryFactory. No Exception are thrown in case of any error use DefaultRepositoryFactory.

Returns:
RepositoryFactory instance.

getRepositoryInstance

public ResponseRecordRepository getRepositoryInstance(javax.servlet.http.HttpSession httpSession)
Returns an instance of configured ResponseRecordRepository. No Exception are thrown in case of any error use DefaultRepositoryFactory.

Returns:
ResponseRecordRepository instance for given Session.


Copyright © 2004-2005 sourceforge. All Rights Reserved.