com.quartzdesk.api.web.initializer
Interface IApplicationInitializer


public interface IApplicationInitializer

QuartzDesk Web Application initializer interface that is used to obtain important resources required for successful application initialization.

By default, the QuartzDesk Web Application uses the com.quartzdesk.core.initializer.WorkDirApplicationInitializer implementation that uses resources stored in the configured work directory specified in the quartzdesk.work.dir servlet context init parameter or JVM system property.

Integrators can specify a custom initializer implementation by specifying the implementation class in the quartzdesk.initializer.class servlet context init parameter or JVM system property.

All implementing classes must provide a no-arg constructor.

Version:
$Id:$
Author:
Jan Moravec

Method Summary
 File getCustomizationDir()
          Invoked by the QuartzDesk Web Application to obtain the directory where the application looks for customization resources.
 InputStream getLicenseKey()
          Invoked by the QuartzDesk Web Application to obtain the application license key data.
 InputStream getLoggingConfig()
          Invoked by the QuartzDesk Web Application to obtain the logging framework configuration data.
 Map<String,String> getLoggingContextProperties()
          Invoked by the QuartzDesk Web Application to obtain the application logging context properties.
 Properties getNonDefaultConfigProperties()
          Invoked by the QuartzDesk Web Application to obtain the non-default application configuration properties (typically stored in the [quartzdesk.work.dir]/quartzdesk.properties file).
 File getOemDir()
          Invoked by the QuartzDesk Web Application to obtain the OEM directory where the application looks for overridden resource files (images, i18n resources, JavaScript resources etc.).
 File getTempDir()
          Invoked by the QuartzDesk Web Application to obtain the temporary directory where the application stores temporary files (e.g.
 void initialize(javax.servlet.ServletContext servletContext)
          Invoked by the QuartzDesk Web Application during its initialization.
 

Method Detail

initialize

void initialize(javax.servlet.ServletContext servletContext)
Invoked by the QuartzDesk Web Application during its initialization. This method is invoked before any of the other methods defined in this class are invoked.

Parameters:
servletContext - a servlet context.

getOemDir

File getOemDir()
Invoked by the QuartzDesk Web Application to obtain the OEM directory where the application looks for overridden resource files (images, i18n resources, JavaScript resources etc.).

Returns:
the QuartzDesk Web Application's OEM directory.

getCustomizationDir

File getCustomizationDir()
Invoked by the QuartzDesk Web Application to obtain the directory where the application looks for customization resources.

Returns:
the QuartzDesk Web Application's customization directory.

getTempDir

File getTempDir()
Invoked by the QuartzDesk Web Application to obtain the temporary directory where the application stores temporary files (e.g. exported job execution logs, charts etc.).

Returns:
the QuartzDesk Web Application's temporary directory.

getLicenseKey

InputStream getLicenseKey()
Invoked by the QuartzDesk Web Application to obtain the application license key data.

Returns:
the QuartzDesk Web Application's license key data.

getLoggingConfig

InputStream getLoggingConfig()
Invoked by the QuartzDesk Web Application to obtain the logging framework configuration data.

The logging configuration data must be compatible with the Logback configuration XML DTD/schema.

Returns:
the QuartzDesk Web Application logging framework configuration data.

getLoggingContextProperties

Map<String,String> getLoggingContextProperties()
Invoked by the QuartzDesk Web Application to obtain the application logging context properties. Logging frameworks can use use context properties to expand placeholders (typically various file paths, port numbers, hostnames, etc.) in their configuration to avoid hard-coding.

For example:

  <appender name="FILE" class="ext.ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${logs.dir}/quartzdesk.log</file>
    <append>true</append>
    ...
  </appender>
 

Returns:
the logging context properties, or null if no properties should be set.

getNonDefaultConfigProperties

Properties getNonDefaultConfigProperties()
Invoked by the QuartzDesk Web Application to obtain the non-default application configuration properties (typically stored in the [quartzdesk.work.dir]/quartzdesk.properties file).

Returns:
the non-default QuartzDesk Web Application configuration properties.


Copyright © 2013–2017 QuartzDesk.com. All rights reserved.