|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jpublish.SiteContext
This class contains configuration information for a particular site. Pages are loaded and actions are executed within the context of the site and have access to all of the methods within this class.
Instances of the SiteContext class will also reload themselves automatically when the underlying configuration file changes.
Fields inherited from interface org.jpublish.XMLConstants |
NS, NS_PREFIX, NS_URL |
Constructor Summary | |
SiteContext(java.io.File configurationFile)
Construct a new SiteContext using the given File to load the context's configuration. |
Method Summary | |
java.lang.String |
getActionIdentifier()
Get the action identifier which is used to trigger parameter actions. |
ActionManager |
getActionManager()
Get the site's ActionManager. |
java.io.File |
getActionRoot()
Get the directory where action scripts are stored. |
java.lang.String |
getDefaultMimeType()
Get the default mime type. |
java.lang.String |
getDefaultPage()
Get the default page. |
java.lang.String |
getDefaultTemplate()
Get the default template. |
java.util.Map |
getEJBs()
Get a Map of EJBHome interfaces. |
java.util.Map |
getExposedEJBs()
Get a Map of EJB Session beans which are exposed on the page directly. |
org.formproc.FormManager |
getFormManager()
Get the site's FormManager. |
MimeTypeMap |
getMimeTypeMap()
Get the site's MimeType map. |
PageManager |
getPageManager()
Get the site's PageManager. |
java.io.File |
getPageRoot()
Get the directory where page configuration files are stored. |
java.util.List |
getRepositories()
Get a list of all registered repositories. |
Repository |
getRepository(java.lang.String name)
Get a Repository by name. |
StaticResourceLoader |
getStaticResourceLoader()
Get the static resource loader. |
java.io.File |
getStaticRoot()
Get the directory where static files are stored. |
java.io.File |
getTemplateRoot()
Get the directory where templates are stored. |
java.io.File |
getWebInfPath()
Get the File for the WEB-INF directory. |
void |
load(java.io.InputStream in)
Load the site configuration from the given InputStream. |
void |
reload()
Reload the site configuration. |
void |
setActionIdentifier(java.lang.String actionIdentifier)
Set the action identifier. |
void |
setActionRoot(java.io.File actionRoot)
Set the directory where action scripts are stored. |
void |
setActionRoot(java.lang.String actionRoot)
Set the directory where action scripts are stored. |
void |
setDefaultMimeType(java.lang.String defaultMimeType)
Set the default mime type. |
void |
setDefaultPage(java.lang.String defaultPage)
Set the default page. |
void |
setDefaultTemplate(java.lang.String defaultTemplate)
Set the default template. |
void |
setPageRoot(java.io.File pageRoot)
Set the directory where page configuration files are stored. |
void |
setPageRoot(java.lang.String pageRoot)
Set the directory where page configuration files are stored. |
void |
setStaticRoot(java.io.File staticRoot)
Set the directory where static files are stored. |
void |
setStaticRoot(java.lang.String staticRoot)
Set the directory where static files are stored. |
void |
setTemplateRoot(java.io.File templateRoot)
Set the directory where templates are stored. |
void |
setTemplateRoot(java.lang.String templateRoot)
Set the directory where templates are stored. |
void |
setWebInfPath(java.io.File webInfPath)
Set the File for the WEB-INF directory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SiteContext(java.io.File configurationFile)
configurationFile
- The configuration FileMethod Detail |
public java.io.File getPageRoot()
public void setPageRoot(java.io.File pageRoot)
pageRoot
- The new page rootpublic void setPageRoot(java.lang.String pageRoot)
pageRoot
- The new page rootpublic java.io.File getTemplateRoot()
public void setTemplateRoot(java.io.File templateRoot)
templateRoot
- The template rootpublic void setTemplateRoot(java.lang.String templateRoot)
templateRoot
- The template rootpublic java.io.File getActionRoot()
public void setActionRoot(java.io.File actionRoot)
actionRoot
- The new action rootpublic void setActionRoot(java.lang.String actionRoot)
actionRoot
- The new action rootpublic java.io.File getStaticRoot()
public void setStaticRoot(java.io.File staticRoot)
staticRoot
- The new root directory where static files are storedpublic void setStaticRoot(java.lang.String staticRoot)
staticRoot
- The path of the new root directory where static
files are storedpublic StaticResourceLoader getStaticResourceLoader()
StaticResourceLoader
public java.io.File getWebInfPath()
public void setWebInfPath(java.io.File webInfPath)
webInfPath
- The WEB-INF filepublic java.lang.String getActionIdentifier()
public void setActionIdentifier(java.lang.String actionIdentifier)
actionIdentifier
- The new action identifer or null to resetpublic java.lang.String getDefaultPage()
public void setDefaultPage(java.lang.String defaultPage)
defaultPage
- The new default pagepublic java.lang.String getDefaultTemplate()
public void setDefaultTemplate(java.lang.String defaultTemplate)
defaultTemplate
- The new default templatepublic java.lang.String getDefaultMimeType()
public void setDefaultMimeType(java.lang.String defaultMimeType)
defaultMimeType
- The new default mime typepublic java.util.List getRepositories()
public java.util.Map getEJBs()
public java.util.Map getExposedEJBs()
public Repository getRepository(java.lang.String name)
name
- The name of the Repositorypublic ActionManager getActionManager()
ActionManager
public PageManager getPageManager()
PageManager
public org.formproc.FormManager getFormManager()
FormManager
public MimeTypeMap getMimeTypeMap()
public void reload()
reload
in interface com.anthonyeden.lib.Reloadable
public void load(java.io.InputStream in) throws java.lang.Exception
in
- The InputStreamjava.lang.Exception
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |