org.roscopeco.janno.core
Interface CoreConfig


public interface CoreConfig

Holds basic configuration information about the Janno core. An implementation of this component is implicitly registered in the root server context.

Version:
$Revision: 1.7 $ $Date: 2005/08/22 00:22:19 $
Author:
Ross Bamford (rosco<at>roscopeco.co.uk)

Method Summary
 URL getApplicationResource(String path)
          Deprecated. Janno is no longer limited to a single web-application. This method returns an undefined value and will be removed before feature lock.
 InputStream getApplicationResourceAsStream(String path)
          Deprecated. Janno is no longer limited to a single web-application. This method returns an undefined value and will be removed before feature lock.
 File getJannoRoot()
           
 File getJannoWar()
          Deprecated. You should deploy Janno unpacked, and most app servers will unpack it if you don't anyway, so this method mostly returns null. It will be removed before feature lock.
 org.apache.commons.logging.Log getLog()
           
 File getModuleDirectory()
          Returns the directory containing modules for deployment.
 MoxyContext getServerContext()
           
 ServletContext getServletContext()
          Deprecated. Janno is no longer limited to a single web-application. This method returns an undefined value and will be removed before feature lock.
 

Method Detail

getJannoRoot

File getJannoRoot()
Returns:
The root of the Janno installation, or null if Janno is deployed as a packed War.

getJannoWar

@Deprecated
File getJannoWar()
Deprecated. You should deploy Janno unpacked, and most app servers will unpack it if you don't anyway, so this method mostly returns null. It will be removed before feature lock.

Returns:
The WAR file Janno is deployed from, or null if unpacked deployment was used, or the core could not determine the location of the file.

getModuleDirectory

File getModuleDirectory()
Returns the directory containing modules for deployment. This may be a subdirectory of the root, or not. It must of course be visible to the application server.

In an unpacked deployment where no explicit configuration is made, this will return the default META-INF/modules, although no validation is performed.

Returns:
The module directory, or null if the module directory couldn't be determined.

getServerContext

MoxyContext getServerContext()
Returns:
The root (server) context in the Janno tree.

getServletContext

@Deprecated
ServletContext getServletContext()
Deprecated. Janno is no longer limited to a single web-application. This method returns an undefined value and will be removed before feature lock.

Returns:
The ServletContext allocated to the Janno core.

getApplicationResource

@Deprecated
URL getApplicationResource(String path)
                           throws MalformedURLException
Deprecated. Janno is no longer limited to a single web-application. This method returns an undefined value and will be removed before feature lock.

Obtains a URL referencing the requested webapp resource. This uses the ServletContext's getResource method and should be independent of the deployment method in use.

Paths should be specified with leading slash, relative to the Janno webapp root.

Returns:
A URL referencing the requested resource.
Throws:
MalformedURLException

getApplicationResourceAsStream

@Deprecated
InputStream getApplicationResourceAsStream(String path)
Deprecated. Janno is no longer limited to a single web-application. This method returns an undefined value and will be removed before feature lock.

Obtains an InputStream with data from the requested webapp resource. This uses the ServletContext's getResourceAsStream method and should be independent of the deployment method in use.

Paths should be specified with leading slash, relative to the Janno webapp root.

Returns:
A InputStream referencing the requested resource.

getLog

org.apache.commons.logging.Log getLog()
Returns:
The Log provided for module deployer and other core code to use. This is independent of any ServletContext log and will usually be routed to the server log unless configured otherwise.


Copyright © 2005 Roscopeco Open Technologies. All Rights Reserved.