org.kefirsf.bb
Class ConfigurationFactory

java.lang.Object
  extended by org.kefirsf.bb.ConfigurationFactory

public class ConfigurationFactory
extends Object

Create the text processor configuration

Author:
Vitaliy Samolovskih aka Kefir

Field Summary
static String DEFAULT_CONFIGURATION_FILE
           
static String DEFAULT_PROPERTIES_FILE
           
static String DEFAULT_PROPERTIES_XML_FILE
           
static String DEFAULT_USER_CONFIGURATION_FILE
           
 
Method Summary
 Configuration create()
          Create the default bb-code processor.
 Configuration create(File file)
          Create the bb-code processor from file with XML-configuration.
 Configuration create(InputStream stream)
          Create the bb-processor from XML InputStream
 Configuration create(String fileName)
          Create the bb-code processor from file with XML-configuration.
 Configuration createFromResource(String resourceName)
          Create the bb-processor using xml-configuration resource
static ConfigurationFactory getInstance()
          Return instance of class ConfigurationFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USER_CONFIGURATION_FILE

public static final String DEFAULT_USER_CONFIGURATION_FILE
See Also:
Constant Field Values

DEFAULT_CONFIGURATION_FILE

public static final String DEFAULT_CONFIGURATION_FILE
See Also:
Constant Field Values

DEFAULT_PROPERTIES_FILE

public static final String DEFAULT_PROPERTIES_FILE
See Also:
Constant Field Values

DEFAULT_PROPERTIES_XML_FILE

public static final String DEFAULT_PROPERTIES_XML_FILE
See Also:
Constant Field Values
Method Detail

getInstance

public static ConfigurationFactory getInstance()
Return instance of class ConfigurationFactory

Returns:
configuration factory

create

public Configuration create()
Create the default bb-code processor.

Returns:
Default bb-code processor
Throws:
TextProcessorFactoryException - when can't read the default code set resource

createFromResource

public Configuration createFromResource(String resourceName)
Create the bb-processor using xml-configuration resource

Parameters:
resourceName - name of resource file
Returns:
bb-code processor
Throws:
TextProcessorFactoryException - when can't find or read the resource or illegal config file

create

public Configuration create(String fileName)
Create the bb-code processor from file with XML-configuration.

Parameters:
fileName - name of file with configuration
Returns:
bb-code processor
Throws:
TextProcessorFactoryException - any problems

create

public Configuration create(File file)
Create the bb-code processor from file with XML-configuration.

Parameters:
file - file with configuration
Returns:
bb-code processor
Throws:
TextProcessorFactoryException - any problems

create

public Configuration create(InputStream stream)
Create the bb-processor from XML InputStream

Parameters:
stream - the input stream with XML
Returns:
bb-code processor
Throws:
TextProcessorFactoryException - when can't build Document


Copyright © 2013. All Rights Reserved.