org.liquidsite.app.servlet
Interface Application

All Known Implementing Classes:
LiquidSiteServlet

public interface Application

The application context. This interface provides the basic infrastructure for inter-application communication and for sharing global datastructures.


Method Summary
 java.io.File getBaseDir()
          Returns the base application directory.
 java.lang.String getBuildDate()
          Returns the application build date.
 java.lang.String getBuildVersion()
          Returns the application build version number.
 Configuration getConfig()
          Returns the application configuration.
 ContentManager getContentManager()
          Returns the application content manager.
 DatabaseConnector getDatabase()
          Returns the application database connector.
 javax.servlet.ServletContext getServletContext()
          Returns the application servlet context.
 boolean isOnline()
          Checks if the application is running correctly.
 void restart()
          Restarts the application.
 

Method Detail

isOnline

public boolean isOnline()
Checks if the application is running correctly. This method will return true if no major errors have been encountered, such as database connections are not working or similar. Note that this method may return true even if the application is not installed, assuming that the installed has been properly launched.

Returns:
true if the application is online and working, or false otherwise

restart

public void restart()
Restarts the application. This will perform a partial shutdown followed by a startup, flushing and rereading all datastructures, such as configuration, database connections, and similar.


getBuildVersion

public java.lang.String getBuildVersion()
Returns the application build version number.

Returns:
the application build version number

getBuildDate

public java.lang.String getBuildDate()
Returns the application build date.

Returns:
the application build date

getBaseDir

public java.io.File getBaseDir()
Returns the base application directory. This is the directory containing all the application files (i.e. the corresponding webapps directory).

Returns:
the base application directory

getConfig

public Configuration getConfig()
Returns the application configuration. The object returned by this method will not change, unless a reset is made, but the parameter values in the configuration may be modified.

Returns:
the application configuration

getDatabase

public DatabaseConnector getDatabase()
Returns the application database connector. The object returned by this method will not change, unless a reset is made.

Returns:
the application database connector

getContentManager

public ContentManager getContentManager()
Returns the application content manager. The object returned by this method will not change, unless a reset is made.

Returns:
the application content manager

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns the application servlet context.

Returns:
the application servlet context