<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE mule-configuration PUBLIC "-//SymphonySoft //DTD mule-configuration XML V1.0//EN"
                                "http://www.symphonysoft.com/dtds/mule/mule-configuration.dtd">

<mule-configuration id="Ferienclub" version="1.0">

    <mule-environment-properties synchronous="true" serverUrl=""/>

     <endpoint-identifiers>
         <endpoint-identifier name="EntryPoint" value="axis:http://localhost:8081/axis/services"/>
         <endpoint-identifier name="GetRoomsRequests" value="axis:http://localhost:8081/axis/services/VacancyManagement?method=getRooms"/>
         <endpoint-identifier name="GetBookingsRequests" value="axis:http://localhost:8081/axis/services/VacancyManagement?method=getBookings4Room"/>
         <endpoint-identifier name="BookingRequest" value="vm://booking.request"/>
         <endpoint-identifier name="BookingRequest1" value="vm://booking.request?method=getBookings"/>
         <endpoint-identifier name="MakeBookingRequests" value="axis:http://localhost:8081/axis/services/VacancyManagement?method=makeBooking"/>
         <endpoint-identifier name="GetUserRequests" value="axis:http://localhost:8081/axis/services/CustomerAdministration?method=getUsers"/>
         <endpoint-identifier name="EnterNewUserRequests" value="axis:http://localhost:8081/axis/services/CustomerAdministration?method=enterNewUser"/>
         <endpoint-identifier name="VacancyMgmRequests" value="axis:http://localhost:8081/axis/services"/>
         <endpoint-identifier name="CustomerAdminRequests" value="axis:http://localhost:8081/axis/services"/>
         <endpoint-identifier name="CustomerAdminRequestsVM" value="vm://customeradmin.requests"/>
         <endpoint-identifier name="CustomerAdminGateway" value="vm://customeradmingateway"/>
         <endpoint-identifier name="LeisureMgmRequests" value="axis:http://localhost:8081/axis/services"/>
         <endpoint-identifier name="LeisureMgmRequestsVM" value="vm://leisuremgmrequest"/>
         <endpoint-identifier name="FacilitiesGateway" value="vm://facilitiesgateway"/>
         <endpoint-identifier name="VMGateway" value="vm://vmgateway"/>
         <endpoint-identifier name="TestComponent" value="vm://testcomponent"/>
         <endpoint-identifier name="PrefRequest" value="axis:http://localhost:8081/axis/services/CustomerAdministration?method=getCustomerPreferences"/>
         <endpoint-identifier name="facility1" value="vm://facility1"/>
         <endpoint-identifier name="facility2" value="vm://facility2"/>
         <endpoint-identifier name="facility3" value="vm://facility3"/>
         <endpoint-identifier name="facility4" value="vm://facility4"/>
         <endpoint-identifier name="BeachClubMgm" value="axis:http://localhost:8081/axis/services"/>
         <endpoint-identifier name="BeachClub" value="vm://beachclub"/>
         <endpoint-identifier name="RFIDGateway" value="vm://rfidgateway"/>
         <endpoint-identifier name="CarRentalGateway" value="vm://carrentalgateway"/>
     </endpoint-identifiers>

    <transformers>
      <transformer name="XMLToRoom" className="org.mule.transformers.xml.ObjectToXml"
            returnClass="com.ferienclub.vacancymgm.beans.Room"/>
    </transformers>

     <model name="MULE-ESB-1">

     <!-- ProcessManager for getting all the Rooms of the club -->

      <mule-descriptor name="GetRoomsPM" implementation="com.ferienclub.mb.GetRoomsPM">
        <inbound-router>
           <endpoint address="EntryPoint"/>
        </inbound-router>
        <outbound-router>
           <router className="org.mule.routing.outbound.OutboundPassThroughRouter">
             <endpoint address="GetRoomsRequests"/>
           </router>
        </outbound-router>
      </mule-descriptor>


      <mule-descriptor name="GetBookingsPM" implementation="com.ferienclub.mb.GetBookingsPM">
        <inbound-router>
           <endpoint address="EntryPoint"/>
        </inbound-router>
        <outbound-router>
           <router className="org.mule.routing.outbound.OutboundPassThroughRouter">
             <endpoint address="GetBookingsRequests"/>
           </router>
        </outbound-router>
      </mule-descriptor>
      
      <mule-descriptor name="MakeBookingPM" implementation="com.ferienclub.mb.MakeBookingPM">
        <inbound-router>
           <endpoint address="EntryPoint"/>
        </inbound-router>
        <outbound-router>
           <router className="org.mule.routing.outbound.OutboundPassThroughRouter">
             <endpoint address="MakeBookingRequests"/>
           </router>
        </outbound-router>
      </mule-descriptor>

      <mule-descriptor name="UserManagementPM" implementation="com.ferienclub.mb.UserManagementPM">
        <inbound-router>
           <endpoint address="EntryPoint"/>
        </inbound-router>
        <outbound-router>
           <router className="org.mule.routing.outbound.FilteringOutboundRouter">
             <endpoint address="GetUserRequests"/>
             <filter expectedType="java.lang.String" className="org.mule.routing.filters.PayloadTypeFilter"/>
           </router>
           <router className="org.mule.routing.outbound.FilteringOutboundRouter">
             <endpoint address="EnterNewUserRequests"/>
             <filter expectedType="com.ferienclub.custadmin.beans.User" className="org.mule.routing.filters.PayloadTypeFilter"/>
           </router>
        </outbound-router>
      </mule-descriptor>

     <!-- Axis Web-Service for the VacancyManagement (Rooms and Bookings) -->

      <mule-descriptor name="VacancyManagement" implementation="com.ferienclub.vacancymgm.VacancyManagementImpl">
         <inbound-router>
            <endpoint address="VacancyMgmRequests"/>
            <endpoint address="BookingRequest"/>
         </inbound-router>
      </mule-descriptor> 


     <!-- Axis Web-Service for the CustomerAdministration (Users and Addresses ... later Appointments, Places, and History) -->

      <mule-descriptor name="CustomerAdministration" implementation="com.ferienclub.custadmin.CustomerAdministrationImpl">
         <inbound-router>
            <endpoint address="CustomerAdminRequests"/>
            <endpoint address="CustomerAdminRequestsVM"/>
         </inbound-router>
      </mule-descriptor>  

     <!-- ************************************* -->  
     <!-- Components for the Leisure Management -->
     <!-- ************************************* -->  

     <mule-descriptor name="LeisureManagement" implementation="com.ferienclub.leisure.esb.LeisureManagement">
         <inbound-router>
            <endpoint address="LeisureMgmRequests"/>
            <endpoint address="LeisureMgmRequestsVM"/>
         </inbound-router>
         <outbound-router>
            <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="FacilitiesGateway"/>
               <filter expectedType="com.ferienclub.leisure.esb.messages.BookingRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
            </router>
            <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="CustomerAdminGateway"/>
               <filter expectedType="com.ferienclub.leisure.esb.messages.LeisureQuery" className="org.mule.routing.filters.PayloadTypeFilter"/>
            </router>
         </outbound-router>
     </mule-descriptor>

     <mule-descriptor name="CustomerAdministrationGateway"
                      implementation="com.ferienclub.leisure.esb.CAGateway">
         <inbound-router>
            <endpoint address="CustomerAdminGateway"/>
         </inbound-router>
         <outbound-router>
            <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="FacilitiesGateway"/>
               <filter expectedType="com.ferienclub.leisure.esb.messages.LeisureQuery" className="org.mule.routing.filters.PayloadTypeFilter"/>
            </router>
            <router className="org.mule.routing.outbound.FilteringOutboundRouter">
              <endpoint address="CustomerAdminRequestsVM"/>
              <filter expectedType="com.ferienclub.leisure.esb.messages.PrefQuery" className="org.mule.routing.filters.PayloadTypeFilter"/>
            </router>
            <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="CustomerAdminRequestsVM"/>
               <filter expectedType="com.ferienclub.custadmin.beans.HistoryEntry" className="org.mule.routing.filters.PayloadTypeFilter"/>
            </router>
         </outbound-router>
     </mule-descriptor>

     <mule-descriptor name="FacilitiesGateway"
                      implementation="com.ferienclub.leisure.esb.FacilitiesGateway">
          <inbound-router>
            <endpoint address="FacilitiesGateway"/>
          </inbound-router>
          <outbound-router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
                <endpoint address="VMGateway"/>
                <filter expectedType="com.ferienclub.leisure.esb.messages.LeisureQuery" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
                <endpoint address="CarRentalGateway"/>
                <filter expectedType="com.ferienclub.leisure.esb.messages.BookingRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
          </outbound-router>
     </mule-descriptor>    

     <mule-descriptor name="CarRentalGateway"
                      implementation="com.ferienclub.leisure.esb.CarRentalGateway">
          <inbound-router>
            <endpoint address="CarRentalGateway"/>
          </inbound-router>
          <outbound-router>
            <router className="org.mule.routing.outbound.FilteringOutboundRouter">
              <endpoint address="CustomerAdminGateway"/>
              <filter expectedType="com.ferienclub.leisure.esb.messages.BookingRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
            </router>
          </outbound-router>
     </mule-descriptor>

     <mule-descriptor name="VMGateway"
                      implementation="com.ferienclub.leisure.esb.VacancyMgmGateway">
          <inbound-router>
            <endpoint address="VMGateway"/>
          </inbound-router>
          <outbound-router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
              <endpoint address="BookingRequest1"/>
              <filter expectedType="com.ferienclub.leisure.esb.messages.BookingQuery" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
             <!-- <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="TestComponent"/>
               <filter expectedType="com.ferienclub.leisure.esb.messages.LeisureQuery" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router> -->
          </outbound-router> 
     </mule-descriptor>

     <!-- Leisure facilities -->
     
     <mule-descriptor name="Museum of Arts"
             inboundEndpoint="facility1"
             implementation="com.ferienclub.leisure.Facility">
        <properties>
          <property name="offer1" value="offer1,museum,1,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer2" value="offer2,museum,2,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer3" value="offer3,museum,3,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer4" value="offer4,museum,4,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer5" value="offer5,museum,5,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer6" value="offer6,museum,6,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer7" value="offer7,museum,7,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer8" value="offer8,museum,8,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer9" value="offer9,museum,9,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
          <property name="offer10" value="offer10,museum,10,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility1"/>
        </properties>
     </mule-descriptor> 

     <mule-descriptor name="Italian Restaurant"
             inboundEndpoint="facility2"
             implementation="com.ferienclub.leisure.Facility">
        <properties>
          <property name="offer1" value="offer1,restaurant,1,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer2" value="offer2,restaurant,2,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer3" value="offer3,restaurant,3,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer4" value="offer4,restaurant,4,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer5" value="offer5,restaurant,5,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer6" value="offer6,restaurant,6,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer7" value="offer7,restaurant,7,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer8" value="offer8,restaurant,8,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer9" value="offer9,restaurant,9,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
          <property name="offer10" value="offer10,restaurant,10,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility2"/>
        </properties>
     </mule-descriptor> 

     <mule-descriptor name="Outdoor Tours"
             inboundEndpoint="facility3"
             implementation="com.ferienclub.leisure.Facility">
        <properties>
          <property name="offer1" value="offer1,outdoor,1,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer2" value="offer2,outdoor,2,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer3" value="offer3,outdoor,3,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer4" value="offer4,outdoor,4,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer5" value="offer5,outdoor,5,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer6" value="offer6,outdoor,6,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer7" value="offer7,outdoor,7,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer8" value="offer8,outdoor,8,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer9" value="offer9,outdoor,9,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
          <property name="offer10" value="offer10,outdoor,10,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility3"/>
        </properties>
     </mule-descriptor> 

     <mule-descriptor name="Sightseeing"
             inboundEndpoint="facility4"
             implementation="com.ferienclub.leisure.Facility">
        <properties>
          <property name="offer1" value="offer1,sightseeing,1,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer2" value="offer2,sightseeing,2,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer3" value="offer3,sightseeing,3,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer4" value="offer4,sightseeing,4,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer5" value="offer5,sightseeing,5,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer6" value="offer6,sightseeing,6,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer7" value="offer7,sightseeing,7,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer8" value="offer8,sightseeing,8,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer9" value="offer9,sightseeing,9,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
          <property name="offer10" value="offer10,sightseeing,10,40,10,16-01-2006 13:00:00,16-01-2006 15:00:00,vm://facility4"/>
        </properties>
     </mule-descriptor> 

     <!-- ********************************** -->
     <!-- *           BeachClub            * -->
     <!-- ********************************** -->

     <mule-descriptor name="BeachClubManagement"
                      implementation="com.ferienclub.beachclub.esb.BeachClubMgm">
          <inbound-router>
            <endpoint address="BeachClubMgm"/>
          </inbound-router>
          <outbound-router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="BeachClub"/>
               <filter expectedType="com.ferienclub.beachclub.esb.messages.MenuRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="RFIDGateway"/>
               <filter expectedType="com.ferienclub.beachclub.esb.messages.OrderRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
          </outbound-router>
     </mule-descriptor>

     <mule-descriptor name="RFIDGateway" 
                      implementation="com.ferienclub.beachclub.esb.RFIDGateway">
          <inbound-router>
            <endpoint address="RFIDGateway"/>
          </inbound-router>
          <outbound-router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="CustomerAdminGateway"/>
               <filter expectedType="com.ferienclub.leisure.esb.messages.HistoryEntryRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
             <router className="org.mule.routing.outbound.FilteringOutboundRouter">
               <endpoint address="BeachClub"/>
               <filter expectedType="com.ferienclub.beachclub.esb.messages.OrderRequest" className="org.mule.routing.filters.PayloadTypeFilter"/>
             </router>
          </outbound-router>
     </mule-descriptor>

     <mule-descriptor name="BeachClub"
             inboundEndpoint="BeachClub"
             implementation="com.ferienclub.beachclub.BeachClub">
        <properties>
          <property name="Coca Cola" value="1.80"/>
          <property name="Fanta" value="1.75"/>
          <property name="Sprite" value="1.75"/>
          <property name="Soda" value="1.10"/>
          <property name="Wodka" value="3.00"/>
          <property name="Whiskey" value="3.20"/>
          <property name="Korn" value="2.00"/>
          <property name="Bacardi" value="2.50"/>
          <property name="Springer" value="2.75"/>
          <property name="Carolus" value="2.30"/>
          <property name="Jägermeister" value="4.00"/>
          <property name="Sex on the Beach" value="5.00"/>
          <property name="Pina Colada" value="5.00"/>
          <property name="Mai Tai" value="10.00"/>
          <property name="LONG ISLAND ICETEA" value="10.00"/>
          <property name="Jimi Hendrix" value="7.50"/>
        </properties>
     </mule-descriptor> 

    </model>

</mule-configuration>