/* * The contents of this file are subject to the Mozilla Public License Version 1.1 * (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at . * * Software distributed under the License is distributed on an "AS IS" basis, WITHOUT * WARRANTY OF ANY KIND, either express or implied. See the License for the specific * language governing rights and limitations under the License. * * The Original Code is the Venice Web Communities System. * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are * Copyright (C) 2002 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. * * Contributor(s): */ package com.silverwrist.dynamo.iface; import com.silverwrist.dynamo.Namespaces; import com.silverwrist.dynamo.except.ConfigException; /** * An object which is used to provide certain data and operations related to the underlying environment * of the application container. * * @author Eric J. Bowersox <erbo@silcom.com> * @version X */ public interface ApplicationSubstrate extends ObjectProvider { /** * The namespace used for all substrate data objects. */ public static final String NAMESPACE = Namespaces.SUBSTRATE_NAMESPACE; /** * The name of the data item containing the base path of the application. In a Web application, this * is the web application's root path. */ public static final String OBJ_BASE_PATH = "base.path"; /** * The name of the data item containing the code path of the application. In a Web application, this * is the web application's WEB-INF directory. */ public static final String OBJ_CODE_PATH = "code.path"; /** * The name of the data item containing the classes path of the application. In a Web application, this * is the web application's WEB-INF/classes directory. */ public static final String OBJ_CLASSES_PATH = "classes.path"; /** * The name of the data item containing the libraries path of the application. In a Web application, this * is the web application's WEB-INF/libs directory. */ public static final String OBJ_LIBS_PATH = "libs.path"; /** * The name of the data item containing the path to use for temporary files. */ public static final String OBJ_TEMP_PATH = "temp.path"; /** * The name of the data item containing the substrate type, for example, "Servlet" for Web applications. */ public static final String OBJ_SUBSTRATE_TYPE = "substrate.type"; /** * The name of the data item containing the substrate specification version. In Web applications, * this is the servlet API version. */ public static final String OBJ_SUBSTRATE_SPECVER = "substrate.spec.version"; /** * The name of the data item containing the application's name. For Web applications, this will be * the application name configured in web.xml. */ public static final String OBJ_APP_NAME = "application.name"; /** * The name of the data item containing the version of Java we're running. */ public static final String OBJ_JAVA_VERSION = "java.version"; /** * The name of the data item containing the name of the underlying operating system. */ public static final String OBJ_OS_NAME = "os.name"; /** * The name of the data item containing the version of the underlying operating system. */ public static final String OBJ_OS_VERSION = "os.version"; /** * Initializes this substrate object. Called as the first operation in the initialization of the * application container. * * @exception com.silverwrist.dynamo.except.ConfigException If there is a problem with the substrate * initialization. */ public void initialize() throws ConfigException; /** * Terminates this substrate object. Called as the final operation in the shutdown of the * application container. */ public void terminate(); } // end interface ApplicationSubstrate