
org.apache.openejb.webadmin.main.HomeBean Maven / Gradle / Ivy
/**
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "OpenEJB" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of The OpenEJB Group. For written permission,
* please contact [email protected].
*
* 4. Products derived from this Software may not be called "OpenEJB"
* nor may "OpenEJB" appear in their names without prior written
* permission of The OpenEJB Group. OpenEJB is a registered
* trademark of The OpenEJB Group.
*
* 5. Due credit should be given to the OpenEJB Project
* (http://www.openejb.org/).
*
* THIS SOFTWARE IS PROVIDED BY THE OPENEJB GROUP AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE OPENEJB GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2001 (C) The OpenEJB Group. All Rights Reserved.
*
* $Id: HomeBean.java 445460 2005-06-16 22:29:56Z jlaskowski $
*/
package org.apache.openejb.webadmin.main;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.openejb.webadmin.HttpRequest;
import org.apache.openejb.webadmin.HttpResponse;
import org.apache.openejb.webadmin.WebAdminBean;
import org.apache.openejb.webadmin.HttpHome;
import javax.ejb.Stateless;
import javax.ejb.RemoteHome;
/** This class represents the "Home" page for the webadmin. It contains general
* information, and more content to be added later.
* @author Tim Urberg
*/
@Stateless(name = "Webadmin/Home")
@RemoteHome(HttpHome.class)
public class HomeBean extends WebAdminBean {
/** Creates a new instance of HomeBean */
public void ejbCreate() {
this.section = "Home";
}
/** after the processing is completed
* @param request the http request
* @param response the http response
* @throws IOException if an exception is thrown
*
*/
public void postProcess(HttpRequest request, HttpResponse response) throws IOException {}
/** before the process is done
* @param request the http request
* @param response the http response
* @throws IOException if an exception is thrown
*
*/
public void preProcess(HttpRequest request, HttpResponse response) throws IOException {}
/** Write the main content
*
* @param body the output to write to
* @exception IOException if an exception is thrown
*
*/
public void writeBody(PrintWriter body) throws IOException {
body.println(
"Welcome to the OpenEJB Web Administration website. This website is designed to help automate");
body.println(
"many of the command line processes in OpenEJB. Please begin by selecting from one of the menu");
body.println("options.
");
body.println(
"We encourage our users to participate in giving suggestions and submitting code and documentation");
body.println(
"for the improvement of OpenEJB. Because it's open source, it's not just our project, it's everyone's");
body.println(
"project! Your feedback and contributions make OpenEJB a better project for everyone! ");
body.println("Future revisions of the OpenEJB Web Administration will contain:");
body.println("");
body.println("- Better bean deployment
");
body.println("- Container Managed Persistance Mapping
");
body.println("- EJB Jar Validator
");
body.println("- More system information
");
body.println("- Better menu orginization
");
body.println("- Addition of an extensive help section and documentation
");
body.println("- Your suggestions!!
");
body.println("
");
body.println("
");
body.println(
"If you have any problems with this website, please don?t hesitate to email the OpenEJB users list: ");
body.println(
"[email protected] and we?ll");
body.println("respond to you as soon as possible.");
}
/** Write the TITLE of the HTML document. This is the part
* that goes into the <head><title>
* </title></head>
tags
*
* @param body the output to write to
* @exception IOException of an exception is thrown
*
*/
public void writeHtmlTitle(PrintWriter body) throws IOException {
body.println(HTML_TITLE);
}
/** Write the title of the page. This is displayed right
* above the main block of content.
*
* @param body the output to write to
* @exception IOException if an exception is thrown
*
*/
public void writePageTitle(PrintWriter body) throws IOException {
body.println("Web Administration Home");
}
/** Write the sub items for this bean in the left navigation bar of
* the page. This should look somthing like the one below:
*
*
* <tr>
* <td valign="top" align="left">
* <a href="system?show=deployments"><span class="subMenuOff">
* Deployments
* </span>
* </a></td>
* </tr>
*
*
* Alternately, the bean can use the method formatSubMenuItem(..) which
* will create HTML like the one above
*
* @param body the output to write to
* @exception IOException if an exception is thrown
*
*/
public void writeSubMenuItems(PrintWriter body) throws IOException {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy