<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!--
JBoss, Home of Professional Open Source
Copyright 2007, Red Hat Middleware LLC, and individual contributors
as indicated by the @author tags.
See the copyright.txt in the distribution for a full listing
of individual contributors.
This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
of the GNU General Public License, v. 2.0.
This program is distributed in the hope that it will be useful, but WITHOUT A
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License,
v. 2.0 along with this distribution; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA  02110-1301, USA.

(C) 2007,
@author JBoss Inc.
-->

<%
    String initialiseAttr = (String) request.getAttribute("INITIALISE");
    if (initialiseAttr == null)
    {
        initialiseAttr = "";
    }
    String dropAttr = (String) request.getAttribute("DROP");
    if (dropAttr == null)
    {
        dropAttr = "/><a";
    }
    String showAttr = (String) request.getAttribute("SHOW");
    if (showAttr == null)
    {
        showAttr = "/><a";
    }
    String orderAttr = (String) request.getAttribute("ORDER");
    if (orderAttr == null)
    {
        orderAttr = "/><a";
    }
    String beginAttr = (String) request.getAttribute("BEGIN");
    if (beginAttr == null)
    {
        beginAttr = "/><a";
    }
    String baServiceAttr = (String) request.getAttribute("BASERVICE");
    if (baServiceAttr == null)
    {
        baServiceAttr = "/><a";
    }
    String completeAttr = (String) request.getAttribute("COMPLETE");
    if (completeAttr == null)
    {
        completeAttr = "/><a";
    }
    String closeAttr = (String) request.getAttribute("CLOSE");
    if (closeAttr == null)
    {
        closeAttr = "/><a";
    }
    String cancelAttr = (String) request.getAttribute("CANCEL");
    if (cancelAttr == null)
    {
        cancelAttr = "/><a";
    }
    String serviceAttr = (String) request.getAttribute("SERVICE");
    if (serviceAttr == null)
    {
        serviceAttr = "/><a";
    }

%>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Business Activity Framework Demo Application</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
    <meta http-equiv="content-language" content="en">
    <meta name="author" content="Maciej Machulak">
    <link rel="stylesheet" type="text/css" href="green.css"/>
</head>
<body>

<div id="main">

<div id="headerLeft">
    <h1>Business Activity Framework Demo Application</h1>
</div>

<div id="headerRight">
    <img src="jboss.jpg">
</div>

<div id="headerBottom">
    Debug window (service return value):
</div>

<div id="headerDebug">
    ${requestScope.DEBUG}
</div>

${requestScope.ACTIVE}

<div id="menu">
    <p>
        <a href="HotelService?page=index.jsp">Home</a><br>
        <a href="HotelService?page=about.jsp">About Demo Application</a><br>
        <a href="HotelService?page=author.jsp">About Author</a><br>
    </p>
    <hr>
    <p>
        <a href="HotelService?page=initialise.jsp" <%=initialiseAttr%>>Initialise data</a><br>
        <a href="HotelService?method=dropHotelData&baRequest=false" <%=dropAttr%>>Delete data</a><br>
        <a href="HotelService?method=getHotelData&baRequest=false" <%=showAttr%>>Show data</a><br>
        <a href="HotelService?method=getHotelOrders&baRequest=true" <%=orderAttr%>>Show orders</a><br>
    </p>
    <hr>
    <p>
        <a href="HotelService?method=startBA&baRequest=true" <%=beginAttr%>>Begin Business Activity</a><br>
    </p>
    <hr>
    <p>
        <b>BA services:</b><br>
        <a href="HotelService?page=hotelinfo.jsp" <%=baServiceAttr%>>Hotel Info</a><br>
        <a href="HotelService?page=bookroom.jsp" <%=baServiceAttr%>>Book Room</a><br>
        <a href="HotelService?page=getpackage.jsp" <%=baServiceAttr%>>Get Package</a><br>
        <a href="HotelService?page=bookfitness.jsp" <%=baServiceAttr%>>Book Fitness</a><br>
        <a href="HotelService?page=bookcasino.jsp" <%=baServiceAttr%>>Book Casino</a><br>
        <a href="HotelService?page=ordermeal.jsp" <%=baServiceAttr%>>Order Meal</a><br>
        <a href="HotelService?page=increaserating.jsp" <%=baServiceAttr%>>Increase Rating</a><br>
        <a href="HotelService?page=decreaserating.jsp" <%=baServiceAttr%>>Decrease Rating</a><br>
    </p>
    <hr>
    <p>
        <a href="HotelService?method=completeBA&baRequest=true"<%=completeAttr%>>Complete Business Activity</a><br>
        <a href="HotelService?method=closeBA&baRequest=true" <%=closeAttr%>>Close Business Activity</a><br>
        <a href="HotelService?method=cancelBA&baRequest=true" <%=cancelAttr%>>Cancel Business Activity</a><br>
    </p>
    <hr>
    <p>
        <b>Normal services:</b><br>
        <a href="HotelService?page=cancelroom.jsp" <%=serviceAttr%>>Cancel Room</a><br>
        <a href="HotelService?page=cancelpackage.jsp" <%=serviceAttr%>>Cancel Package</a><br>
        <a href="HotelService?page=cancelfitness.jsp" <%=serviceAttr%>>Cancel Fitness</a><br>
        <a href="HotelService?page=cancelcasino.jsp" <%=serviceAttr%>>Cancel Casino</a><br>
        <a href="HotelService?page=cancelmeal.jsp" <%=serviceAttr%>>Cancel Meal</a><br>
    </p>
    <hr>
</div>

<div id="body" align=center>

    <h1>Business Activity Framework Demo Application</h1>
    <p align="left">
        <b>Overview</b><br>
        The Business Activity Framework is a fully novel comprehensive solution for building
        transactional Web Services with accordance to the model defined in the WS-BusinessActivity
        specification. It provides a lightweight API that consists of a set of easy to learn and
        intuitive annotations and operations. It significantly facilitates development of transaction
        aware Web Services and releases programmers from mixing transaction related code with business
        logic of their applications.
        Web Services must be simply annotated with a set of defined annotations and the framework
        transparently applies all necessary transactional mechanisms to enable participation in
        long-running Business Activities.
    </p>
    <p align="left">
        <b>Quick start</b><br>
        This is a simple Web-based demo application for the novel Business Activity Framework. It helps with
        understanding the basic concepts of using framework's API. To quickly start using this application
        simply:
        <ul>
            <li>Initialise data on the server -> <a href="HotelService?page=initialise.jsp">click here</a>
            <li>Start the Business Activity -> <a href="HotelService?method=startBA&baRequest=true">click here</a>
            <li>Use any of provided BA Services
            <li>Complete the Business Activity (if "Book Fitness" service is used)
            <li>End the Business Activity - by either closing or cancelling the work.
        </ul>
    </p>
    <p align="left">
        Please follow this <a href="about.jsp">link</a> to learn more about the application.

    </p>
    <p align="left">
        BA Framework version: 0.2.0<br>
        BA Demo Application version: 0.2.0<br>
    </p>
    <p align="center">
        <a href="http://labs.jboss.com/jbosstm/baframework">http://labs.jboss.com/jbosstm/baframework</a><br>
        <br>
        <br>
        Maciej Machulak<br>
        <a href="mailto:mmachulak-at-redhat.com">mmachulak-at-redhat.com</a><br>
        August 13, 2007<br>
        JBoss, a division of Red Hat.
    </p>


</div>

<div id="footer">
    <p align=right>
        &copy; JBoss, a division of Red Hat
    </p>
</div>

</div>

</body>
</html>