-Cleaning up the build - moving to Spring 2.1-m3

-Refactored for more modularization of the flows
This commit is contained in:
Jeremy Grelle
2007-08-09 17:28:37 +00:00
parent 41143046a3
commit e2f0d821cb
25 changed files with 59 additions and 55 deletions

View File

@@ -6,8 +6,5 @@
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="lib" path="lib/test/junit.jar"/>
<classpathentry kind="lib" path="lib/test/spring-mock.jar"/>
<classpathentry kind="lib" path="lib/global/freemarker.jar"/>
<classpathentry kind="lib" path="lib/global/hibernate.jar"/>
<classpathentry kind="lib" path="lib/global/hibernate-tools.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@@ -1,5 +1,6 @@
#Tue Jul 31 15:11:23 EDT 2007
#Thu Aug 09 13:12:30 EDT 2007
eclipse.preferences.version=1
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5

View File

@@ -1,8 +1,9 @@
#Tue Jul 31 15:09:12 EDT 2007
#Thu Aug 09 13:12:30 EDT 2007
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Spring Java Conventions
formatter_settings_version=11
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true

View File

@@ -1,4 +1,5 @@
#Fri Aug 03 12:43:55 EDT 2007
#Thu Aug 09 13:12:30 EDT 2007
eclipse.preferences.version=1
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
org.eclipse.jpt.core.discoverAnnotatedClasses=true
org.eclipse.jpt.core.platform=generic

View File

@@ -1,4 +1,5 @@
#Mon Nov 13 17:23:47 PST 2006
#Thu Aug 09 13:12:30 EDT 2007
classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER/owners=jst.java\:5.0
classpath.helper/org.eclipse.jst.server.core.container\:\:org.eclipse.jst.server.tomcat.runtimeTarget\:\:Apache\ Tomcat\ v5.5/owners=jst.web\:2.4
eclipse.preferences.version=1
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true

View File

@@ -1,6 +1,7 @@
#Mon Nov 13 17:29:33 PST 2006
#Thu Aug 09 13:12:30 EDT 2007
DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;
USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;
USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator;org.eclipse.jst.jsp.core.internal.validation.JSPELValidator;org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator;org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;
USER_PREFERENCE=overrideGlobalPreferencesfalse
eclipse.preferences.version=1
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true

View File

@@ -1,4 +1,5 @@
#Fri Aug 03 13:03:09 EDT 2007
#Thu Aug 09 13:12:30 EDT 2007
default.configuration=swf-booking-jsf
eclipse.preferences.version=1
hibernate3.enabled=true
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true

View File

@@ -1,5 +1,6 @@
#Thu Aug 02 15:26:32 EDT 2007
#Thu Aug 09 13:12:30 EDT 2007
eclipse.preferences.version=1
instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true

View File

@@ -1,6 +1,6 @@
<ivy-module version="1.1">
<info organisation="org.springframework" module="swf-sellitem-jsf"/>
<info organisation="org.springframework" module="swf-booking-jsf"/>
<configurations>
<conf name="default" extends="global"/>
@@ -15,28 +15,24 @@
<dependency org="taglibs" name="standard" rev="1.1.2"/>
<dependency org="jstl" name="jstl" rev="1.1.2"/>
<dependency org="aopalliance" name="aopalliance" rev="1.0" />
<dependency org="org.springframework" name="spring-webflow" rev="latest.integration" conf="global->default,jsf"/>
<dependency org="org.springframework" name="spring-aop" rev="2.0.6"/>
<dependency org="org.springframework" name="spring-dao" rev="2.0.6"/>
<dependency org="org.springframework" name="spring-jdbc" rev="2.0.6"/>
<dependency org="org.springframework" name="spring-hibernate3" rev="2.0.6"/>
<dependency org="org.springframework" name="spring-webflow" rev="latest.integration" conf="global->default,jsf12"/>
<dependency org="org.springframework" name="spring-aop" rev="2.1-m3"/>
<dependency org="org.springframework" name="spring-orm" rev="2.1-m3"/>
<dependency org="org.springframework" name="spring-jdbc" rev="2.1-m3"/>
<dependency org="org.springframework" name="spring-tx" rev="2.1-m3"/>
<dependency org="jboss" name="jboss-el" rev="1.0"/>
<dependency org="org.hibernate" name="hibernate" rev="3.2.4.ga" />
<dependency org="org.hibernate" name="hibernate-tools" rev="3.2.0.beta9a" />
<dependency org="org.hibernate" name="hibernate-entitymanager" rev="3.3.1.ga"/>
<dependency org="org.hibernate" name="hibernate-commons-annotations" rev="3.3.0.ga"/>
<dependency org="concurrent" name="concurrent" rev="1.3.4"/>
<dependency org="javax.persistence" name="persistence-api" rev="1.0b"/>
<dependency org="toplink.essentials" name="toplink-essentials" rev="2.0-56"/>
<dependency org="org.springframework" name="spring-jpa" rev="2.0.6"/>
<dependency org="commons-digester" name="commons-digester" rev="1.8"/> <!-- MyFaces 1.2 dependency? -->
<dependency org="commons-codec" name="commons-codec" rev="1.3"/> <!-- MyFaces 1.2 dependency? -->
<dependency org="commons-discovery" name="commons-discovery" rev="0.4"/> <!-- MyFaces 1.2 dependency? -->
<dependency org="commons-collections" name="commons-collections" rev="3.2"/> <!-- MyFaces 1.2 dependency? -->
<dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.13"/>
<dependency org="hsqldb" name="hsqldb" rev="1.8.0.7"/>
<!-- build-time only dependencies -->
<dependency org="javax.servlet" name="servlet-api" rev="2.4" conf="buildtime->default"/>
<dependency org="javax.el" name="el-api" rev="1.0" conf="buildtime->default"/>
<!-- test-time only dependencies -->
<dependency org="junit" name="junit" rev="3.8.2" conf="test->default" />

View File

@@ -5,9 +5,9 @@
version="1.0">
<persistence-unit name="bookingDatabase">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.springframework.webflow.samples.booking.User</class>
<class>org.springframework.webflow.samples.booking.Booking</class>
<class>org.springframework.webflow.samples.booking.Hotel</class>
<class>org.springframework.webflow.samples.booking.model.User</class>
<class>org.springframework.webflow.samples.booking.model.Booking</class>
<class>org.springframework.webflow.samples.booking.model.Hotel</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop" />

View File

@@ -2,11 +2,13 @@ package org.springframework.webflow.samples.booking;
import java.util.List;
import javax.faces.context.FacesContext;
import org.springframework.webflow.action.MultiAction;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;
import org.springframework.webflow.samples.booking.model.Booking;
import org.springframework.webflow.samples.booking.model.Hotel;
import org.springframework.webflow.samples.booking.model.User;
import org.springframework.webflow.samples.booking.service.BookingService;
public class SearchAction extends MultiAction {
@@ -37,15 +39,6 @@ public class SearchAction extends MultiAction {
return success();
}
public String nextPage() {
HotelSearch search = (HotelSearch) FacesContext.getCurrentInstance().getApplication().getVariableResolver()
.resolveVariable(FacesContext.getCurrentInstance(), "hotelSearch");
search.setPage(search.getPage() + 1);
return "findHotels";
}
public void setBookingService(BookingService bookingService) {
this.bookingService = bookingService;
}

View File

@@ -8,6 +8,7 @@ import javax.faces.context.FacesContext;
import org.springframework.webflow.action.AbstractAction;
import org.springframework.webflow.execution.Event;
import org.springframework.webflow.execution.RequestContext;
import org.springframework.webflow.samples.booking.model.Booking;
public class ValidateBookingAction extends AbstractAction {

View File

@@ -1,4 +1,4 @@
package org.springframework.webflow.samples.booking;
package org.springframework.webflow.samples.booking.model;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -16,6 +16,7 @@ import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
//import org.hibernate.validator.Length;
//import org.hibernate.validator.NotNull;
//import org.hibernate.validator.Pattern;

View File

@@ -1,4 +1,4 @@
package org.springframework.webflow.samples.booking;
package org.springframework.webflow.samples.booking.model;
import java.io.Serializable;
import java.math.BigDecimal;

View File

@@ -1,4 +1,4 @@
package org.springframework.webflow.samples.booking;
package org.springframework.webflow.samples.booking.model;
import java.io.Serializable;

View File

@@ -1,7 +1,11 @@
package org.springframework.webflow.samples.booking;
package org.springframework.webflow.samples.booking.service;
import java.util.List;
import org.springframework.webflow.samples.booking.model.Booking;
import org.springframework.webflow.samples.booking.model.Hotel;
import org.springframework.webflow.samples.booking.model.User;
public interface BookingService {
public List<Booking> findBookings(User user);

View File

@@ -1,4 +1,4 @@
package org.springframework.webflow.samples.booking;
package org.springframework.webflow.samples.booking.service;
import java.util.List;
@@ -8,6 +8,9 @@ import javax.persistence.PersistenceContext;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.springframework.webflow.samples.booking.model.Booking;
import org.springframework.webflow.samples.booking.model.Hotel;
import org.springframework.webflow.samples.booking.model.User;
@Repository
public class JpaBookingService implements BookingService {

View File

@@ -25,7 +25,7 @@
<tx:annotation-driven transaction-manager="txManager"/>
<bean id="bookingService"
class="org.springframework.webflow.samples.booking.JpaBookingService" />
class="org.springframework.webflow.samples.booking.service.JpaBookingService" />
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

View File

@@ -1,4 +1,4 @@
package org.springframework.webflow.samples.booking;
package org.springframework.webflow.samples.booking.util;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;

View File

@@ -0,0 +1,2 @@
Manifest-Version: 1.0

View File

@@ -12,7 +12,7 @@
</application>
<lifecycle>
<phase-listener>org.springframework.webflow.samples.booking.DebuggingPhaseListener</phase-listener>
<phase-listener>org.springframework.webflow.samples.booking.util.DebuggingPhaseListener</phase-listener>
<phase-listener>org.springframework.webflow.executor.jsf.FlowPhaseListener</phase-listener>
</lifecycle>

View File

@@ -7,7 +7,7 @@
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:org/springframework/webflow/samples/booking/services-config-jpa.xml
classpath:org/springframework/webflow/samples/booking/service/services-config-jpa.xml
/WEB-INF/webflow-config.xml
</param-value>
</context-param>

View File

@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.1.xsd">
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<flow:enable-scopes/>
<bean id="user" class="org.springframework.webflow.samples.booking.User" scope="conversation">
<bean id="user" class="org.springframework.webflow.samples.booking.model.User" scope="conversation">
<property name="username" value="jeremy"/>
<property name="password" value="barfoo"/>
<property name="name" value="Jeremy Grelle"/>

View File

@@ -5,7 +5,7 @@
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
<var name="hotelSearch" class="org.springframework.webflow.samples.booking.HotelSearch" scope="flow"/>
<var name="user" bean="user"/>
<var name="user" bean="user"/> <!-- Can replace this when we can replace searchAction with bean-actions -->
<start-state idref="findBookings"/>

View File

@@ -11,12 +11,9 @@
<div align="left">
<p>
<h:form>
<h:commandLink value="Book Hotels" action="flowId:main-flow"/> (launch with a JSF command link)
<h:commandLink value="Book Hotels" action="flowId:main-flow"/>
</h:form>
</p>
<p>
<a href="controller.swf?_flowId=main-flow">Book Hotels</a> (launch with a regular anchor tag)
</p>
</div>
<hr/>
</f:view>