railo.runtime.config
Class ConfigWebFactory

java.lang.Object
  extended by railo.runtime.config.ConfigWebFactory

public final class ConfigWebFactory
extends Object


Constructor Summary
ConfigWebFactory()
           
 
Method Summary
static void createContextFiles(Resource configDir, javax.servlet.ServletConfig servletConfig, boolean doNew)
          Creates all files for Railo Context
static void createContextFilesPost(Resource configDir, ConfigImpl config, javax.servlet.ServletConfig servletConfig, boolean isEventGatewayContext, boolean doNew)
           
static void createFileFromResourceEL(String resource, Resource file)
           
static void createHtAccess(Resource htAccess)
           
static Element getChildByName(Node parent, String nodeName)
          return first direct child Elements of a Element with given Name
static Element getChildByName(Node parent, String nodeName, boolean insertBefore)
           
static Element getChildByName(Node parent, String nodeName, boolean insertBefore, boolean doNotCreate)
           
static Element[] getChildren(Node parent, String nodeName)
          return all direct child Elements of a Element with given Name
static void load(ConfigServerImpl configServer, ConfigImpl config, Document doc, boolean isReload, boolean doNew)
           
static ConfigWebImpl newInstance(CFMLFactoryImpl factory, ConfigServerImpl configServer, Resource configDir, javax.servlet.ServletConfig servletConfig)
          creates a new ServletConfig Impl Object
static void reloadInstance(ConfigImpl config, boolean force)
          reloads the Config Object
static void reloadLib(ConfigImpl config)
           
static int toInt(String value, int defaultValue)
          cast a string value to a int
static long toLong(String value, long defaultValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigWebFactory

public ConfigWebFactory()
Method Detail

newInstance

public static ConfigWebImpl newInstance(CFMLFactoryImpl factory,
                                        ConfigServerImpl configServer,
                                        Resource configDir,
                                        javax.servlet.ServletConfig servletConfig)
                                 throws SAXException,
                                        ClassException,
                                        PageException,
                                        IOException,
                                        TagLibException,
                                        FunctionLibException
creates a new ServletConfig Impl Object

Parameters:
configServer -
configDir -
servletConfig -
Returns:
new Instance
Throws:
SAXException
ClassNotFoundException
PageException
IOException
TagLibException
FunctionLibException
ClassException

createHtAccess

public static void createHtAccess(Resource htAccess)

reloadInstance

public static void reloadInstance(ConfigImpl config,
                                  boolean force)
                           throws SAXException,
                                  ClassException,
                                  PageException,
                                  IOException,
                                  TagLibException,
                                  FunctionLibException
reloads the Config Object

Parameters:
config -
force -
Throws:
SAXException
ClassNotFoundException
PageException
IOException
TagLibException
FunctionLibException
ClassException

load

public static void load(ConfigServerImpl configServer,
                        ConfigImpl config,
                        Document doc,
                        boolean isReload,
                        boolean doNew)
                 throws ClassException,
                        PageException,
                        IOException,
                        TagLibException,
                        FunctionLibException
Parameters:
configServer -
config -
doc -
Throws:
ClassNotFoundException
IOException
FunctionLibException
TagLibException
PageException
ClassException

reloadLib

public static void reloadLib(ConfigImpl config)
                      throws IOException
Throws:
IOException

createFileFromResourceEL

public static void createFileFromResourceEL(String resource,
                                            Resource file)

createContextFiles

public static void createContextFiles(Resource configDir,
                                      javax.servlet.ServletConfig servletConfig,
                                      boolean doNew)
                               throws IOException
Creates all files for Railo Context

Parameters:
configDir -
Throws:
IOException
IOException

createContextFilesPost

public static void createContextFilesPost(Resource configDir,
                                          ConfigImpl config,
                                          javax.servlet.ServletConfig servletConfig,
                                          boolean isEventGatewayContext,
                                          boolean doNew)
                                   throws IOException
Throws:
IOException

toInt

public static int toInt(String value,
                        int defaultValue)
cast a string value to a int

Parameters:
value - String value represent a int value
defaultValue - if can't cast to a int is value will be returned
Returns:
int value

toLong

public static long toLong(String value,
                          long defaultValue)

getChildByName

public static Element getChildByName(Node parent,
                                     String nodeName)
return first direct child Elements of a Element with given Name

Parameters:
parent -
nodeName -
Returns:
matching children

getChildByName

public static Element getChildByName(Node parent,
                                     String nodeName,
                                     boolean insertBefore)

getChildByName

public static Element getChildByName(Node parent,
                                     String nodeName,
                                     boolean insertBefore,
                                     boolean doNotCreate)

getChildren

public static Element[] getChildren(Node parent,
                                    String nodeName)
return all direct child Elements of a Element with given Name

Parameters:
parent -
nodeName -
Returns:
matching children


Copyright © 2012 Railo