net.contextfw.web.application
Class ModuleConfiguration

java.lang.Object
  extended by net.contextfw.web.application.ModuleConfiguration

public class ModuleConfiguration
extends Object

Configures the application during initalization


Constructor Summary
ModuleConfiguration()
           
 
Method Summary
 ModuleConfiguration addResourcePaths(String... resources)
          Add paths where to look for resources.
 ModuleConfiguration attributeHandlerClass(Class<? extends AttributeHandler> attributeHandler)
           
 ModuleConfiguration debugMode(boolean debugMode)
           
 Class<? extends AttributeHandler> getAttributeHandlerClass()
           
 String getContextPath()
           
 long getErrorTime()
           
 List<String> getInitializerRootPackages()
           
 long getMaxInactivity()
           
 long getPollTime()
           
 List<String> getResourcePaths()
           
 String getResourcesPrefix()
           
 int getTransformerCount()
           
 String getXmlParamName()
           
 ModuleConfiguration initializerRootPackages(String... packages)
           
 boolean isDebugMode()
           
 boolean isLogXML()
           
 ModuleConfiguration setContextPath(String contextPath)
           
 void setErrorTime(long errorTime)
           
 void setLogXML(boolean logXML)
           
 void setMaxInactivity(long maxInactivity)
           
 void setPollTime(long pollTime)
           
 void setResourcesPrefix(String resourcesPrefix)
          Set's the prefix for public resources files.
 ModuleConfiguration setTransformerCount(int transformerCount)
          Sets the number of concurrent transformers Transformers are used to transform DOM-tree via XSL to XHTML.
 void setXmlParamName(String xmlParamName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleConfiguration

public ModuleConfiguration()
Method Detail

attributeHandlerClass

public ModuleConfiguration attributeHandlerClass(Class<? extends AttributeHandler> attributeHandler)

getAttributeHandlerClass

public Class<? extends AttributeHandler> getAttributeHandlerClass()

debugMode

public ModuleConfiguration debugMode(boolean debugMode)

initializerRootPackages

public ModuleConfiguration initializerRootPackages(String... packages)

addResourcePaths

public ModuleConfiguration addResourcePaths(String... resources)
Add paths where to look for resources.

Supported possibilities are

Parameters:
resources -
Returns:

getInitializerRootPackages

public List<String> getInitializerRootPackages()

getResourcePaths

public List<String> getResourcePaths()

isDebugMode

public boolean isDebugMode()

setXmlParamName

public void setXmlParamName(String xmlParamName)

getXmlParamName

public String getXmlParamName()

setLogXML

public void setLogXML(boolean logXML)

isLogXML

public boolean isLogXML()

setResourcesPrefix

public void setResourcesPrefix(String resourcesPrefix)
Set's the prefix for public resources files.

That is javascript and css-files

Parameters:
resourcesPrefix -

getResourcesPrefix

public String getResourcesPrefix()

setPollTime

public void setPollTime(long pollTime)

getPollTime

public long getPollTime()

setMaxInactivity

public void setMaxInactivity(long maxInactivity)

getMaxInactivity

public long getMaxInactivity()

setErrorTime

public void setErrorTime(long errorTime)

getErrorTime

public long getErrorTime()

getContextPath

public String getContextPath()

setContextPath

public ModuleConfiguration setContextPath(String contextPath)

setTransformerCount

public ModuleConfiguration setTransformerCount(int transformerCount)
Sets the number of concurrent transformers

Transformers are used to transform DOM-tree via XSL to XHTML.

This methods sets the number of that can be used concurrently. This requirement comes from the fact that transformers are not thread-safe.

By default the number of transformers is 1 and is usable in development. Hoverer for production the number should be increased, but there is a down side for large number of transformer, which is memory consumption. Templates must be loaded for every transformer and they cannot be shared.

Parameters:
transformerCount - The number of transformers. Minimum is 1.
Returns:
The configuration

getTransformerCount

public int getTransformerCount()


Copyright © 2010. All Rights Reserved.