All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quartzdesk.api.web.initializer.IApplicationInitializer Maven / Gradle / Ivy

Go to download

QuartzDesk Public API library required for QuartzDesk Standard and Enterprise edition installations. This library must be placed on the classpath of the Quartz scheduler based application that is managed by QuartzDesk. It is important that this library is loaded by the same classloader that loads the Quartz scheduler API used by the application.

The newest version!
/*
 * Copyright (c) 2013-2024 QuartzDesk.com. All Rights Reserved.
 * QuartzDesk.com PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package com.quartzdesk.api.web.initializer;

import javax.servlet.ServletContext;
import java.io.File;
import java.io.InputStream;
import java.util.Map;
import java.util.Properties;

/**
 * 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 {@code com.quartzdesk.core.initializer.WorkDirApplicationInitializer} * implementation that uses resources stored in the configured work directory specified in the {@code * quartzdesk-web.work.dir} servlet context init parameter or JVM system property.

* *

Integrators can specify a custom initializer implementation by specifying the implementation class in the {@code * quartzdesk-web.initializer.class} servlet context init parameter or JVM system property.

* *

All implementing classes must provide a no-arg constructor.

* * @version $Id:$ */ public interface IApplicationInitializer { /** * Invoked by the QuartzDesk Web Application to obtain the directory where the application looks for customization * resources. * * @return the QuartzDesk Web Application's customization directory. */ File getCustomizationDir(); /** * Invoked by the QuartzDesk Web Application to obtain the application license key data. * * @return the QuartzDesk Web Application's license key data. */ InputStream getLicenseKey(); /** * 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.

* * @return the QuartzDesk Web Application logging framework configuration data. */ InputStream getLoggingConfig(); /** * 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-web.log</file>
   *    <append>true</append>
   *    ...
   *  </appender>
   * 
* * @return the logging context properties, or null if no properties should be set. */ Map getLoggingContextProperties(); /** * Invoked by the QuartzDesk Web Application to obtain the application configuration properties. * This method must return config properties that include the default config properties passed to * the {@link #initialize(ServletContext, Properties)} method. * * @return the QuartzDesk Web Application configuration properties. */ Properties getConfigProperties(); /** * 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.). * * @return the QuartzDesk Web Application's OEM directory. */ File getOemDir(); /** * 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.). * * @return the QuartzDesk Web Application's temporary directory. */ File getTempDir(); /** * 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. * * @param servletContext a servlet context. * @param defaultConfigProperties default application configuration properties. */ void initialize( ServletContext servletContext, Properties defaultConfigProperties ); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy