diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.classpath b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.classpath deleted file mode 100644 index a97461d7..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.classpath +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.project b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.project deleted file mode 100644 index 2a2b78c1..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.project +++ /dev/null @@ -1,30 +0,0 @@ - - - org.springframework.samples.springtravel.hotel.search - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - com.springsource.platform.ide.facet.core.bundlenature - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/com.springsource.platform.ide.jdt.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/com.springsource.platform.ide.jdt.core.prefs deleted file mode 100644 index 796543a7..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/com.springsource.platform.ide.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -#Thu Jun 26 15:49:03 EDT 2008 -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.javax.persistence-1.0.0.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/ext/com.springsource.javax.persistence-sources-1.0.0.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.javax.servlet-2.5.0.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/ext/com.springsource.javax.servlet-sources-2.5.0.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.org.apache.myfaces.javax.faces-1.2.2.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/com.springsource.org.apache.myfaces.javax.faces-sources-1.2.2.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.org.hibernate-3.2.6.ga.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/com.springsource.org.hibernate-sources-3.2.6.ga.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.org.hibernate.annotations-3.3.0.ga.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/com.springsource.org.hibernate.annotations-sources-3.3.0.ga.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.org.hibernate.annotations.common-3.3.0.ga.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/com.springsource.org.hibernate.annotations.common-sources-3.3.0.ga.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.org.hibernate.ejb-3.3.1.ga.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/com.springsource.org.hibernate.ejb-sources-3.3.1.ga.jar -com.springsource.platform.ide.jdt.core.source.attachment-com.springsource.org.hsqldb-1.8.0.9.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/com.springsource.org.hsqldb-sources-1.8.0.9.jar -com.springsource.platform.ide.jdt.core.source.attachment-org.springframework.faces-2.0.3.BUILD-20080626134159.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/org.springframework.faces-sources-2.0.3.BUILD-20080626134159.jar -com.springsource.platform.ide.jdt.core.source.attachment-org.springframework.faces-2.0.3.BUILD-20080626184449.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/org.springframework.faces-sources-2.0.3.BUILD-20080626184449.jar -com.springsource.platform.ide.jdt.core.source.attachment-org.springframework.faces-2.0.3.BUILD-20080626190601.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/org.springframework.faces-sources-2.0.3.BUILD-20080626190601.jar -com.springsource.platform.ide.jdt.core.source.attachment-org.springframework.security-2.0.0.A.jar=/Users/scott/development/springsource-ap-1.0.0.beta6/repository/bundles/usr/org.springframework.security-sources-2.0.0.A.jar -eclipse.preferences.version=1 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.jdt.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index cdc8c2a3..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Wed Apr 30 14:04:29 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.jst.common.project.facet.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.jst.common.project.facet.core.prefs deleted file mode 100644 index 13fc2d20..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.jst.common.project.facet.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Wed May 07 10:35:56 BST 2008 -classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER/owners=jst.java\:5.0 -eclipse.preferences.version=1 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index c525c05d..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.springBeans b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.springBeans deleted file mode 100644 index f54b2155..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/.springBeans +++ /dev/null @@ -1,15 +0,0 @@ - - - 1 - - - - - - - src/main/resources/META-INF/spring/module-context.xml - src/main/resources/META-INF/spring/osgi-context.xml - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/build.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/build.xml deleted file mode 100644 index 061e94d8..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/build.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/ivy.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/ivy.xml deleted file mode 100644 index fe84fed0..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/ivy.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/Hotel.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/Hotel.java deleted file mode 100644 index 081b77a3..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/Hotel.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.springframework.samples.springtravel.hotel.search; - -import java.io.Serializable; -import java.math.BigDecimal; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; - -/** - * A hotel where users may book stays. - */ -@Entity -public class Hotel implements Serializable { - - private static final long serialVersionUID = 1L; - - private Long id; - - private String name; - - private String address; - - private String city; - - private String state; - - private String zip; - - private String country; - - private BigDecimal price; - - @Id - @GeneratedValue - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - @Column(precision = 6, scale = 2) - public BigDecimal getPrice() { - return price; - } - - public void setPrice(BigDecimal price) { - this.price = price; - } - - @Override - public String toString() { - return "Hotel(" + name + "," + address + "," + city + "," + zip + ")"; - } -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/HotelSearchAgent.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/HotelSearchAgent.java deleted file mode 100644 index 017ac867..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/HotelSearchAgent.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.springframework.samples.springtravel.hotel.search; - -import java.util.List; - -/** - * A service interface for retrieving hotels from a backing repository. - */ -public interface HotelSearchAgent { - - /** - * Find hotels available for booking by some criteria. - * - * @param criteria - * the search criteria - * @return a list of hotels meeting the criteria - */ - public List findHotels(SearchCriteria criteria); - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/SearchCriteria.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/SearchCriteria.java deleted file mode 100644 index 4b76aee2..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/SearchCriteria.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.springframework.samples.springtravel.hotel.search; - -import java.io.Serializable; - -/** - * A backing bean for the main hotel search form. Encapsulates the criteria - * needed to perform a hotel search. - * - * It is expected a future milestone of Spring Web Flow 2.0 will allow - * flow-scoped beans like this one to hold references to transient services that - * are restored automatically when the flow is resumed on subsequent requests. - * This would allow this SearchCriteria object to delegate to the - * {@link HotelSearchAgent} directly, for example, eliminating the need for the - * actions in {@link MainActions}. - */ -public class SearchCriteria implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * The user-provided search criteria for finding Hotels. - */ - private String searchString; - - /** - * The maximum page size of the Hotel result list - */ - private int pageSize; - - /** - * The current page of the Hotel result list. - */ - private int page; - - public String getSearchString() { - return searchString; - } - - public void setSearchString(String searchString) { - this.searchString = searchString; - } - - public int getPageSize() { - return pageSize; - } - - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - public int getPage() { - return page; - } - - public void setPage(int page) { - this.page = page; - } - - public void nextPage() { - page++; - } - - public void previousPage() { - page--; - } - - public void resetPage() { - page = 0; - } -} \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/impl/JpaHotelSearchAgent.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/impl/JpaHotelSearchAgent.java deleted file mode 100644 index cc41997b..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/java/org/springframework/samples/springtravel/hotel/search/impl/JpaHotelSearchAgent.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.springframework.samples.springtravel.hotel.search.impl; - -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import org.springframework.samples.springtravel.hotel.search.Hotel; -import org.springframework.samples.springtravel.hotel.search.HotelSearchAgent; -import org.springframework.samples.springtravel.hotel.search.SearchCriteria; -import org.springframework.stereotype.Repository; -import org.springframework.transaction.annotation.Transactional; - -/** - * A JPA-based implementation of the Search Agent. Delegates to a JPA entity - * manager to issue data access calls against the backing repository. The - * EntityManager reference is provided by the managing container (Spring) - * automatically. - */ -@Repository -public class JpaHotelSearchAgent implements HotelSearchAgent { - - private EntityManager em; - - @PersistenceContext - public void setEntityManager(EntityManager em) { - this.em = em; - } - - @Transactional(readOnly = true) - @SuppressWarnings("unchecked") - public List findHotels(SearchCriteria criteria) { - String pattern = "%" + criteria.getSearchString() + "%"; - List hotels = em.createQuery( - "select h from Hotel h where lower(h.name) like :pattern" - + " or lower(h.city) like :pattern" - + " or lower(h.zip) like :pattern" - + " or lower(h.address) like :pattern") - .setParameter("pattern", pattern) - .setMaxResults(criteria.getPageSize()).setFirstResult( - criteria.getPage() * criteria.getPageSize()) - .getResultList(); - return hotels; - } - -} \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/MANIFEST.MF b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index bf85e2e3..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Spring Travel Hotel Module -Bundle-SymbolicName: org.springframework.samples.springtravel.hotel.search -Bundle-Vendor: SpringSource -Bundle-Version: 2.0.3 -Export-Package: - org.springframework.samples.springtravel.hotel.search -Import-Package: - javax.sql -Import-Bundle: - com.springsource.org.hsqldb;version="[1.8.0, 2.0.0)" -Import-Library: - org.springframework.spring;version="[2.5.4,3.0.0)", - org.hibernate.ejb;version="[3.3.1.ga, 3.3.1.ga]" diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/persistence.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index e691ef90..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - org.hibernate.ejb.HibernatePersistence - org.springframework.samples.springtravel.hotel.search.Hotel - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/spring/module-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/spring/module-context.xml deleted file mode 100644 index c2f82777..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/spring/module-context.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/spring/osgi-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/spring/osgi-context.xml deleted file mode 100644 index dfa34d11..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/main/resources/META-INF/spring/osgi-context.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/java/org/springframework/samples/springtravel/hotel/search/impl/JpaHotelSearchAgentTests.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/java/org/springframework/samples/springtravel/hotel/search/impl/JpaHotelSearchAgentTests.java deleted file mode 100644 index 82761516..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/java/org/springframework/samples/springtravel/hotel/search/impl/JpaHotelSearchAgentTests.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.springframework.samples.springtravel.hotel.search.impl; - -import java.util.List; - -import org.springframework.samples.springtravel.hotel.search.Hotel; -import org.springframework.samples.springtravel.hotel.search.HotelSearchAgent; -import org.springframework.samples.springtravel.hotel.search.SearchCriteria; -import org.springframework.test.jpa.AbstractJpaTests; - -public class JpaHotelSearchAgentTests extends AbstractJpaTests { - - private HotelSearchAgent hotelSearchAgent; - - @Override - protected String[] getConfigLocations() { - return new String[] { "classpath:/test-jpa-context.xml" }; - } - - public void setHotelSearchAgent(HotelSearchAgent hotelSearchAgent) { - this.hotelSearchAgent = hotelSearchAgent; - } - - public void testFindHotelsWithEmptyCriteria() { - SearchCriteria criteria = new SearchCriteria(); - criteria.setPage(0); - criteria.setPageSize(Integer.MAX_VALUE); - criteria.setSearchString(""); - List hotels = hotelSearchAgent.findHotels(criteria); - assertEquals(23, hotels.size()); - } - - public void testFindHotelsWithSearchTerm() { - SearchCriteria criteria = new SearchCriteria(); - criteria.setPage(0); - criteria.setPageSize(Integer.MAX_VALUE); - criteria.setSearchString("westin"); - List hotels = hotelSearchAgent.findHotels(criteria); - assertEquals(1, hotels.size()); - assertTrue(((Hotel)hotels.get(0)).getName().contains("Westin")); - } - - public void testFindHotelsWithPageSize() { - SearchCriteria criteria = new SearchCriteria(); - criteria.setPage(0); - criteria.setPageSize(5); - criteria.setSearchString(""); - List hotels = hotelSearchAgent.findHotels(criteria); - assertEquals(5, hotels.size()); - } - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/import.sql b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/import.sql deleted file mode 100644 index 14284da7..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/import.sql +++ /dev/null @@ -1,23 +0,0 @@ -insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 199, 'Westin Diplomat', '3555 S. Ocean Drive', 'Hollywood', 'FL', '33019', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 60, 'Jameson Inn', '890 Palm Bay Rd NE', 'Palm Bay', 'FL', '32905', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 199, 'Chilworth Manor', 'The Cottage, Southampton Business Park', 'Southampton', 'Hants', 'SO16 7JF', 'UK') -insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (7, 450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain') -insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel') -insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan') -insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 130, 'Hotel Beaulac', ' Esplanade Léopold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland') -insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia') -insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada') -insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia') -insert into Hotel (id, price, name, address, city, state, zip, country) values (22, 250, 'Meliá White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain') -insert into Hotel (id, price, name, address, city, state, zip, country) values (23, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA') \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/test-hotel-persistence.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/test-hotel-persistence.xml deleted file mode 100644 index e691ef90..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/test-hotel-persistence.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - org.hibernate.ejb.HibernatePersistence - org.springframework.samples.springtravel.hotel.search.Hotel - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/test-jpa-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/test-jpa-context.xml deleted file mode 100644 index b0bafa91..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.hotel.search/src/test/resources/test-jpa-context.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.classpath b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.classpath deleted file mode 100644 index c32daf65..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.project b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.project deleted file mode 100644 index 8c898a9a..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.project +++ /dev/null @@ -1,30 +0,0 @@ - - - org.springframework.samples.springtravel.resource - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - com.springsource.platform.ide.facet.core.bundlenature - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.jdt.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index cdc8c2a3..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Wed Apr 30 14:04:29 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.jst.common.project.facet.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.jst.common.project.facet.core.prefs deleted file mode 100644 index 13fc2d20..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.jst.common.project.facet.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Wed May 07 10:35:56 BST 2008 -classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER/owners=jst.java\:5.0 -eclipse.preferences.version=1 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index c525c05d..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.springBeans b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.springBeans deleted file mode 100644 index 4a47426b..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/.springBeans +++ /dev/null @@ -1,13 +0,0 @@ - - - 1 - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/build.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/build.xml deleted file mode 100644 index 1c06e6c4..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/build.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/ivy.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/ivy.xml deleted file mode 100644 index 8f455813..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/ivy.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/MANIFEST.MF b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index c249e040..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,13 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Spring Travel Shared Resources Module -Bundle-SymbolicName: org.springframework.samples.springtravel.resource -Bundle-Vendor: SpringSource -Bundle-Version: 1.0.0 -Import-Package: - javax.sql -Import-Bundle: - com.springsource.org.hsqldb;version="[1.8.0, 2.0.0)", - com.springsource.org.apache.commons.dbcp;version="[1.2.2.osgi,1.3.0)" -Import-Library: - org.springframework.spring;version="[2.5.4, 3.0)" diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/spring/module-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/spring/module-context.xml deleted file mode 100644 index fe89fd05..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/spring/module-context.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/spring/osgi-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/spring/osgi-context.xml deleted file mode 100644 index 1d2c3d48..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.resource/src/main/resources/META-INF/spring/osgi-context.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.classpath b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.classpath deleted file mode 100644 index c50613be..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.classpath +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.project b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.project deleted file mode 100644 index 6f2f3876..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.project +++ /dev/null @@ -1,30 +0,0 @@ - - - org.springframework.samples.springtravel.webapp - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - com.springsource.platform.ide.facet.core.bundlenature - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.settings/org.eclipse.jdt.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index bca0008a..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Wed Apr 30 15:14:56 BST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index fada7b5c..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.springBeans b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.springBeans deleted file mode 100644 index 4a47426b..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/.springBeans +++ /dev/null @@ -1,13 +0,0 @@ - - - 1 - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/build.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/build.xml deleted file mode 100644 index 481c0f25..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/build.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/ivy.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/ivy.xml deleted file mode 100644 index f4dc2989..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/ivy.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/HotelBooking.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/HotelBooking.java deleted file mode 100644 index 665b6b3f..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/HotelBooking.java +++ /dev/null @@ -1,206 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.text.DateFormat; -import java.util.Calendar; -import java.util.Date; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; - -import org.springframework.binding.message.MessageBuilder; -import org.springframework.binding.message.MessageContext; - -import org.springframework.samples.springtravel.hotel.search.Hotel; - -/** - * A Hotel Booking made by a User. - */ -@Entity -public class HotelBooking implements Serializable { - private Long id; - - private User user; - - private Hotel hotel; - - private Date checkinDate; - - private Date checkoutDate; - - private String creditCard; - - private String creditCardName; - - private int creditCardExpiryMonth; - - private int creditCardExpiryYear; - - private boolean smoking; - - private int beds; - - public HotelBooking() { - Calendar calendar = Calendar.getInstance(); - setCheckinDate(calendar.getTime()); - calendar.add(Calendar.DAY_OF_MONTH, 1); - setCheckoutDate(calendar.getTime()); - } - - public HotelBooking(Hotel hotel, User user) { - this(); - this.hotel = hotel; - this.user = user; - } - - @Transient - public BigDecimal getTotal() { - return hotel.getPrice().multiply(new BigDecimal(getNights())); - } - - @Transient - public int getNights() { - if (checkinDate == null || checkoutDate == null) { - return 0; - } else { - return (int) (checkoutDate.getTime() - checkinDate.getTime()) - / 1000 / 60 / 60 / 24; - } - } - - @Id - @GeneratedValue(strategy = GenerationType.TABLE) - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - @Basic - @Temporal(TemporalType.DATE) - public Date getCheckinDate() { - return checkinDate; - } - - public void setCheckinDate(Date datetime) { - this.checkinDate = datetime; - } - - @ManyToOne - public Hotel getHotel() { - return hotel; - } - - public void setHotel(Hotel hotel) { - this.hotel = hotel; - } - - @ManyToOne - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } - - @Basic - @Temporal(TemporalType.DATE) - public Date getCheckoutDate() { - return checkoutDate; - } - - public void setCheckoutDate(Date checkoutDate) { - this.checkoutDate = checkoutDate; - } - - public String getCreditCard() { - return creditCard; - } - - public void setCreditCard(String creditCard) { - this.creditCard = creditCard; - } - - @Transient - public String getDescription() { - DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); - return hotel == null ? null : hotel.getName() + ", " - + df.format(getCheckinDate()) + " to " - + df.format(getCheckoutDate()); - } - - public boolean isSmoking() { - return smoking; - } - - public void setSmoking(boolean smoking) { - this.smoking = smoking; - } - - public int getBeds() { - return beds; - } - - public void setBeds(int beds) { - this.beds = beds; - } - - public String getCreditCardName() { - return creditCardName; - } - - public void setCreditCardName(String creditCardName) { - this.creditCardName = creditCardName; - } - - public int getCreditCardExpiryMonth() { - return creditCardExpiryMonth; - } - - public void setCreditCardExpiryMonth(int creditCardExpiryMonth) { - this.creditCardExpiryMonth = creditCardExpiryMonth; - } - - public int getCreditCardExpiryYear() { - return creditCardExpiryYear; - } - - public void setCreditCardExpiryYear(int creditCardExpiryYear) { - this.creditCardExpiryYear = creditCardExpiryYear; - } - - public void validateEnterBookingDetails(MessageContext context) { - if (checkinDate.before(today())) { - context.addMessage(new MessageBuilder().error().source( - "checkinDate").code("booking.checkinDate.beforeToday") - .build()); - } else if (checkoutDate.before(checkinDate)) { - context.addMessage(new MessageBuilder().error().source( - "checkoutDate").code( - "booking.checkoutDate.beforeCheckinDate").build()); - } - } - - private Date today() { - Calendar calendar = Calendar.getInstance(); - calendar.add(Calendar.DAY_OF_MONTH, -1); - return calendar.getTime(); - } - - @Override - public String toString() { - return "Booking(" + user + "," + hotel + ")"; - } - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/HotelBookingAgent.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/HotelBookingAgent.java deleted file mode 100644 index 6b3ae3d8..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/HotelBookingAgent.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking; - -import java.util.List; - -import org.springframework.samples.springtravel.hotel.search.Hotel; - -/** - * A service interface for retrieving bookings from a backing - * repository. Also supports the ability to cancel a booking. - */ -public interface HotelBookingAgent { - - /** - * Find bookings made by the given user - * - * @param username - * the user's name - * @return their bookings - */ - public List findBookings(String username); - - /** - * Cancel an existing booking. - * - * @param id - * the booking id - */ - public void cancelBooking(Long id); - - // flow helpers - - /** - * Create a new, persistent, hotel booking instance for the given user. This method is a flow - * helper, it has no direct relationship to the booking process. - * - * @param hotelId - * the hotel id - * @param userName - * the user name - * @return the new transient booking instance - */ - public HotelBooking createBooking(Long hotelId, String userName); - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/ReferenceData.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/ReferenceData.java deleted file mode 100644 index c0d546fa..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/ReferenceData.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking; - -import java.util.ArrayList; -import java.util.List; - -import javax.faces.model.SelectItem; - -import org.springframework.stereotype.Service; - -@Service -public class ReferenceData { - - private List bedOptions; - - private List smokingOptions; - - private List creditCardExpMonths; - - private List creditCardExpYears; - - private List pageSizeOptions; - - public List getBedOptions() { - if (bedOptions == null) { - bedOptions = new ArrayList(); - bedOptions.add(new SelectItem(new Integer(1), "One king-size bed")); - bedOptions.add(new SelectItem(new Integer(2), "Two double beds")); - bedOptions.add(new SelectItem(new Integer(3), "Three beds")); - } - return bedOptions; - } - - public List getSmokingOptions() { - if (smokingOptions == null) { - smokingOptions = new ArrayList(); - smokingOptions.add(new SelectItem(Boolean.TRUE, "Smoking")); - smokingOptions.add(new SelectItem(Boolean.FALSE, "Non-Smoking")); - } - return smokingOptions; - } - - public List getCreditCardExpMonths() { - if (creditCardExpMonths == null) { - creditCardExpMonths = new ArrayList(); - creditCardExpMonths.add(new SelectItem(new Integer(1), "Jan")); - creditCardExpMonths.add(new SelectItem(new Integer(2), "Feb")); - creditCardExpMonths.add(new SelectItem(new Integer(3), "Mar")); - creditCardExpMonths.add(new SelectItem(new Integer(4), "Apr")); - creditCardExpMonths.add(new SelectItem(new Integer(5), "May")); - creditCardExpMonths.add(new SelectItem(new Integer(6), "Jun")); - creditCardExpMonths.add(new SelectItem(new Integer(7), "Jul")); - creditCardExpMonths.add(new SelectItem(new Integer(8), "Aug")); - creditCardExpMonths.add(new SelectItem(new Integer(9), "Sep")); - creditCardExpMonths.add(new SelectItem(new Integer(10), "Oct")); - creditCardExpMonths.add(new SelectItem(new Integer(11), "Nov")); - creditCardExpMonths.add(new SelectItem(new Integer(12), "Dec")); - } - return creditCardExpMonths; - } - - public List getCreditCardExpYears() { - if (creditCardExpYears == null) { - creditCardExpYears = new ArrayList(); - creditCardExpYears.add(new SelectItem(new Integer(2008), "2008")); - creditCardExpYears.add(new SelectItem(new Integer(2009), "2009")); - creditCardExpYears.add(new SelectItem(new Integer(2010), "2010")); - creditCardExpYears.add(new SelectItem(new Integer(2010), "2011")); - creditCardExpYears.add(new SelectItem(new Integer(2010), "2012")); - } - return creditCardExpYears; - } - - public List getPageSizeOptions() { - if (pageSizeOptions == null) { - pageSizeOptions = new ArrayList(); - pageSizeOptions.add(new SelectItem(new Integer(5), "5")); - pageSizeOptions.add(new SelectItem(new Integer(10), "10")); - pageSizeOptions.add(new SelectItem(new Integer(20), "20")); - } - return pageSizeOptions; - } - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/User.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/User.java deleted file mode 100644 index 2554374b..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/User.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking; - -import java.io.Serializable; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; - -/** - * A user who can book hotels. - */ -@Entity -@Table(name = "Customer") -public class User implements Serializable { - - private static final long serialVersionUID = -3652559447682574722L; - - private String username; - - private String password; - - private String name; - - public User() { - } - - public User(String username, String password, String name) { - this.username = username; - this.password = password; - this.name = name; - } - - @Id - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "User(" + username + ")"; - } -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/impl/JpaHotelBookingAgent.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/impl/JpaHotelBookingAgent.java deleted file mode 100644 index 46bf1890..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/java/org/springframework/samples/springtravel/hotel/booking/impl/JpaHotelBookingAgent.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking.impl; - -import java.util.List; - -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; - -import org.springframework.samples.springtravel.hotel.booking.HotelBooking; -import org.springframework.samples.springtravel.hotel.booking.HotelBookingAgent; -import org.springframework.samples.springtravel.hotel.booking.User; -import org.springframework.samples.springtravel.hotel.search.Hotel; -import org.springframework.stereotype.Repository; -import org.springframework.transaction.annotation.Transactional; - -/** - * A JPA-based implementation of the Hotel Booking Agent. Delegates to a JPA entity - * manager to issue data access calls against the backing repository. The - * EntityManager reference is provided by the managing container (Spring) - * automatically. - */ -@Repository -public class JpaHotelBookingAgent implements HotelBookingAgent { - - private EntityManager em; - - @PersistenceContext - public void setEntityManager(EntityManager em) { - this.em = em; - } - - @Transactional(readOnly = true) - @SuppressWarnings("unchecked") - public List findBookings(String username) { - if (username != null) { - return em - .createQuery( - "select b from HotelBooking b where b.user.username = :username order by b.checkinDate") - .setParameter("username", username).getResultList(); - } else { - return null; - } - } - - @Transactional - public void cancelBooking(Long id) { - HotelBooking booking = em.find(HotelBooking.class, id); - if (booking != null) { - em.remove(booking); - } - } - - // flow helper - - @Transactional(readOnly = true) - public HotelBooking createBooking(Long hotelId, String username) { - User user = findUser(username); - Hotel hotel = findHotel(hotelId); - HotelBooking booking = new HotelBooking(hotel, user); - em.persist(booking); - return booking; - } - - // helpers - - private User findUser(String username) { - return (User) em.createQuery( - "select u from User u where u.username = :username") - .setParameter("username", username).getSingleResult(); - } - - private Hotel findHotel(Long hotelId) { - return (Hotel) em.createQuery( - "select h from Hotel h where h.id = :hotelId") - .setParameter("hotelId", hotelId).getSingleResult(); - } - -} \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/resources/META-INF/persistence.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 5049fd1d..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - org.hibernate.ejb.HibernatePersistence - org.springframework.samples.springtravel.hotel.booking.User - org.springframework.samples.springtravel.hotel.booking.HotelBooking - org.springframework.samples.springtravel.hotel.search.Hotel - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/resources/import.sql b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/resources/import.sql deleted file mode 100644 index e3211aac..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/resources/import.sql +++ /dev/null @@ -1,27 +0,0 @@ -insert into Customer (username, name) values ('keith', 'Keith') -insert into Customer (username, name) values ('erwin', 'Erwin') -insert into Customer (username, name) values ('jeremy', 'Jeremy') -insert into Customer (username, name) values ('scott', 'Scott') -insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 199, 'Westin Diplomat', '3555 S. Ocean Drive', 'Hollywood', 'FL', '33019', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 60, 'Jameson Inn', '890 Palm Bay Rd NE', 'Palm Bay', 'FL', '32905', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 199, 'Chilworth Manor', 'The Cottage, Southampton Business Park', 'Southampton', 'Hants', 'SO16 7JF', 'UK') -insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (7, 450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain') -insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel') -insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan') -insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 130, 'Hotel Beaulac', ' Esplanade Léopold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland') -insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia') -insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada') -insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA') -insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia') -insert into Hotel (id, price, name, address, city, state, zip, country) values (22, 250, 'Meliá White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain') -insert into Hotel (id, price, name, address, city, state, zip, country) values (23, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA') \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/MANIFEST.MF b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 375d07ee..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,37 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.springframework.samples.springtravel.webapp -Bundle-Name: Spring Travel Web Application Module -Bundle-Vendor: SpringSource -Bundle-Version: 1.0.0 -Import-Package: - org.springframework.samples.springtravel.hotel.search, - javax.sql -Import-Bundle: - org.springframework.webflow;version="[2.0.3,3.0.0)", - org.springframework.js;version="[2.0.3,3.0)", - org.springframework.faces;version="[2.0.3,3.0)", - org.springframework.binding;version="[2.0.3,3.0)", - com.springsource.com.sun.facelets;version="[1.1.14,1.2.0)", - org.springframework.security;version="[2.0.0,2.1.0)", - com.springsource.org.jboss.el;version="[2.0.0,3.0.0)", - com.springsource.org.hsqldb;version="[1.8.0, 2.0.0)" -Import-Library: - org.springframework.spring;version="[2.5.4,3.0.0)", - org.hibernate.ejb;version="[3.3.1.ga, 3.3.1.ga]", - org.apache.myfaces;version="[1.2.0,2.0.0)" -Platform-ModuleType: Web -Web-ContextPath: springtravel-faces -Web-DispatcherServletUrlPatterns: /spring/* -Web-ServletContextListeners: - org.apache.myfaces.webapp.StartupServletContextListener -Web-Servlets: - FacesServlet;servlet-class:="javax.faces.webapp.FacesServlet";load-on-startup:="1";url-patterns:="*.faces", - ResourcesServlet;servlet-class:="org.springframework.js.resource.ResourceServlet";load-on-startup:="0";url-patterns:="/resources/*" -Web-FilterMappings: springSecurityFilterChain;url-patterns:="/*" -Web-ContextParams: - javax.faces.DEFAULT_SUFFIX;param-value:=".xhtml", - facelets.DEVELOPMENT;param-value:="true", - facelets.REFRESH_PERIOD;param-value:="1" -Web-SessionTimeout: 5 -Web-WelcomeFiles: index.html diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/flow-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/flow-context.xml deleted file mode 100644 index 3a849cec..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/flow-context.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - /hotel/search=flowController - /hotel/booking=flowController - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/module-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/module-context.xml deleted file mode 100644 index 2f84dcfe..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/module-context.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/osgi-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/osgi-context.xml deleted file mode 100644 index eea93df9..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/osgi-context.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/persistance-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/persistance-context.xml deleted file mode 100644 index 292bf7f6..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/persistance-context.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/security-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/security-context.xml deleted file mode 100644 index 48747a14..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/META-INF/spring/security-context.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/faces-config.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/faces-config.xml deleted file mode 100644 index 8a0d7056..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/faces-config.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - com.sun.facelets.FaceletViewHandler - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/booking.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/booking.xml deleted file mode 100644 index e2343940..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/booking.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/enterBookingDetails.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/enterBookingDetails.xhtml deleted file mode 100644 index 2e3ebfda..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/enterBookingDetails.xhtml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - -
-

Book Hotel

- -
- -
-
- -
-
-
Name:
-
#{booking.hotel.name}
-
-
-
Address:
-
#{booking.hotel.address}
-
-
-
City, State:
-
#{booking.hotel.city}, #{booking.hotel.state}
-
-
-
Zip:
-
#{booking.hotel.zip}
-
-
-
Country:
-
#{booking.hotel.country}
-
-
-
Nightly rate:
-
- - - -
-
-
-
- Check In Date: -
-
- - - - - -
-
-
-
- Check Out Date: -
-
- - - - - -
-
-
-
- Room Preference: -
-
- - - -
-
-
-
- Smoking Preference: -
-
- - - -
-
-
-
- Credit Card #: -
-
- - - -
-
-
-
- Credit Card Name: -
-
- - - -
-
-
-
- Expiration Date: -
-
- - - - - - -
-
-
- -   - - -
-
-
-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/messages.properties b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/messages.properties deleted file mode 100644 index cbae4eb3..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/messages.properties +++ /dev/null @@ -1,2 +0,0 @@ -booking.checkinDate.beforeToday=The Check In Date must be a future date -booking.checkoutDate.beforeCheckinDate=The Check Out Date must be later than the Check In Date diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/reviewBooking.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/reviewBooking.xhtml deleted file mode 100644 index c224fcd6..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/booking/reviewBooking.xhtml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - -
-

Confirm Hotel Booking

-
- -
- -
-
-
Name:
-
#{booking.hotel.name}
-
-
-
Address:
-
#{booking.hotel.address}
-
-
-
City, State:
-
#{booking.hotel.city}, #{booking.hotel.state}
-
-
-
Zip:
-
#{booking.hotel.zip}
-
-
-
Country:
-
#{booking.hotel.country}
-
-
-
Total payment:
-
- - - -
-
-
-
Check In Date:
-
- - - -
-
-
-
Check Out Date:
-
- - - -
-
-
-
Credit Card #:
-
#{booking.creditCard}
-
-
-   -   - -
-
-
-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/enterSearchCriteria.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/enterSearchCriteria.xhtml deleted file mode 100644 index daf31531..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/enterSearchCriteria.xhtml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -
- - - -

Search Hotels

- -
-
-
- Search String: -
-
- - - -
-
-
-
- Maximum results: -
-
- - - -
-
-
- -
-
-
-
-
- - -
- -

Current Hotel Bookings

- - - - Name - #{booking.hotel.name} - - - Address - #{booking.hotel.address} - - - City, State - #{booking.hotel.city}, #{booking.hotel.state} - - - Check in date - - - - - - Check out date - - - - - - Confirmation number - #{booking.id} - - - Action - - - -
-
-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/reviewHotel.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/reviewHotel.xhtml deleted file mode 100644 index 1511f6c0..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/reviewHotel.xhtml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -
-

View Hotel

- -
-
-
Name:
-
#{hotel.name}
-
-
-
Address:
-
#{hotel.address}
-
-
-
City:
-
#{hotel.city}
-
-
-
State:
-
#{hotel.state}
-
-
-
Zip:
-
#{hotel.zip}
-
-
-
Country:
-
#{hotel.country}
-
-
-
Nightly rate:
-
- - - -
-
-
-   - -
-
-
-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/reviewHotels.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/reviewHotels.xhtml deleted file mode 100644 index c6544b73..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/reviewHotels.xhtml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -
-

Hotel Results

-

- -

- -
- - - - Name - #{h.name} - - - Address - #{h.address} - - - City, State - #{h.city}, #{h.state}, #{h.country} - - - Zip - #{h.zip} - - - Action - - - -
- - -
-
-
-
-
-
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/search.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/search.xml deleted file mode 100644 index cff9aec4..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/hotel/search/search.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/intro.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/intro.xhtml deleted file mode 100644 index 7a6cb433..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/intro.xhtml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - -
-

Welcome to Spring Travel

-

- This reference application illustrates how to use Spring MVC, Spring Web Flow, and Spring Faces - together to power rich web applications based on Spring and JavaServerFaces technology. -

-

- The key features illustrated in this sample include: -

-
    -
  • A declarative navigation model enabling full browser button support and dynamic navigation rules
  • -
  • A fine-grained state management model, including support for ConversationScope and ViewScope
  • -
  • Modularization of web application functionality by domain use case, illustrating project structure best-practices
  • -
  • Managed persistence contexts with the Java Persistence API (JPA)
  • -
  • Unified Expression Language (EL) integration
  • -
  • Spring Security integration
  • -
  • Declarative page authoring with Facelets, including applying reusable page layouts
  • -
  • A lightweight component library for Ajax and client-side validation that employs progressive enhancement techniques
  • -
  • Exception handling support across all layers of the application
  • -
  • Spring IDE tooling integration, with support for graphical flow modeling and visualization
  • -
-

- Start your Spring Travel experience -

-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/layouts/standard.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/layouts/standard.xhtml deleted file mode 100644 index 904b68d1..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/layouts/standard.xhtml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - Spring Faces: Hotel Booking Sample Application - - - - - - - - - - - - -
- -
-
- - generic hotel - - - The Spring Experience - -

-

-
-
- -
-
- -
- -
- \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/login.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/login.xhtml deleted file mode 100644 index 3b836d0d..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/login.xhtml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -

Login Required

- -
- -
- Your login attempt was not successful, try again.
- Reason: #{sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message} -
-
-
-

Valid username/passwords are:

-
    -
  • keith/melbourne
  • -
  • erwin/leuven
  • -
  • jeremy/atlanta
  • -
  • scott/rochester
  • -
-
- -
-
-
-
-
User:
-
- - - - -
-
-
-
Password:
-
- -
-
-
-
Don't ask for my password for two weeks:
-
- -
-
-
-
- -
-
-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/logoutSuccess.xhtml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/logoutSuccess.xhtml deleted file mode 100644 index cdf0b5dc..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/WEB-INF/logoutSuccess.xhtml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - -
-

Logout

-

You have successfully logged out.

-

- Continue -

-
- -
-
\ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/bg.gif b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/bg.gif deleted file mode 100644 index 013cfa6f..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/bg.gif and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/btn.bg.gif b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/btn.bg.gif deleted file mode 100644 index 87256cf4..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/btn.bg.gif and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/diplomat.jpg b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/diplomat.jpg deleted file mode 100644 index e1d0c9cd..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/diplomat.jpg and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/header.jpg b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/header.jpg deleted file mode 100644 index 0be0d4d7..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/header.jpg and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/input.bg.gif b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/input.bg.gif deleted file mode 100644 index 8ebf87e3..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/input.bg.gif and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/powered-by-spring.png b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/powered-by-spring.png deleted file mode 100644 index e773b170..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/powered-by-spring.png and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/th.bg.gif b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/th.bg.gif deleted file mode 100644 index 4663cf51..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/th.bg.gif and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/tse.gif b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/tse.gif deleted file mode 100644 index b1fa98cf..00000000 Binary files a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/images/tse.gif and /dev/null differ diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/index.html b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/index.html deleted file mode 100644 index adf221b4..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/index.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/styles/booking.css b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/styles/booking.css deleted file mode 100644 index a5f814e8..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/main/webapp/styles/booking.css +++ /dev/null @@ -1,154 +0,0 @@ - a, a:visited, a:link, a:active { - color: #59924B; - background-color: transparent; - text-decoration: none; - font-weight: bold; - } - - a:hover { - color: white; - background-color: #65a242; - text-decoration: none; - font-weight: bold; - } - - body.spring { - background-color: #9cac7c; - } - - form div, - form p { - padding: 0px; - margin: 0 0 .5em 0; - } - - #header.spring { - margin: 0 0 1em 0; - padding: 0px 0px; - background-color : #414f23; - } - - #branding.spring { - float: none; - width: 100%; - margin: 10px 0 0 0; - padding: 0 0 0 0; - text-align: none; - } - - #welcome { - padding: 10px 10px; - } - - #welcome div.left { - float: left; - } - - #welcome div.right { - float: right; - } - - #content.spring { - width: 740px; - background: #fff url(../images/bg.gif) 0 0 repeat; - margin-bottom: 0px; - } - - #content.spring input[type="submit"], input[type="button"], button { - font-size: 1em; - font-weight: bold; - color: #fff; - background: #fff url(../images/btn.bg.gif) 0 0 repeat-x; - border-style: none; - padding: 2px 2px 2px 2px; - } - - #local.spring{ - width: 215px; - } - - #footer.spring { - padding: 25px 0; - background-color : white; - border-top: 1px solid #C3BBB6; - } - - #footer.spring img { - float: right; - padding-right: 20px; - } - - .errors { - font-weight: bold; - text-align: left; - color: #600; - } - - .errors ul { - list-style: none; - } - - .section { - text-align: left; - width: 505px; - float: left; - margin-bottom: 5px; - } - - .field { - float:left; - } - - .field .label { - float: left; - padding-top: 5px; - padding-right: 5px; - font-weight: bold; - width: 150px; - text-align: right; - } - - .field .input { - float: left; - width: 250px; - text-align: left; - } - - .field .output { - float: left; - width: 250px; - padding-top: 5px; - text-align: left; - } - - .buttonGroup { - clear: both; - text-align: right; - } - - .buttonGroup input[type="submit"], .buttonGroup input[type="button"], .buttonGroup button, .buttonGroup a { - margin-left: 5px; - margin-right: 5px; - } - - .summary { - width: 100%; - border: 1px solid #414f23; - border-collapse: collapse; - } - - .summary thead th { - border-left: 1px solid #414f23; - background: #fff url(../images/th.bg.gif) 0 100% repeat-x; - border-bottom: 1px solid #414f23; - padding: 6px; - text-align: left; - font-size: small; - } - - .summary tbody td { - border-left: 1px solid #9cac7c; - padding: 4px; - border-bottom: 1px solid #9cac7c; - font-size: 8pt; - } \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/booking/HotelBookingFlowExecutionTests.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/booking/HotelBookingFlowExecutionTests.java deleted file mode 100644 index 97840721..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/booking/HotelBookingFlowExecutionTests.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking; - -import org.easymock.EasyMock; -import org.springframework.faces.model.converter.FacesConversionService; -import org.springframework.samples.springtravel.hotel.search.Hotel; -import org.springframework.webflow.config.FlowDefinitionResource; -import org.springframework.webflow.config.FlowDefinitionResourceFactory; -import org.springframework.webflow.core.collection.LocalAttributeMap; -import org.springframework.webflow.core.collection.MutableAttributeMap; -import org.springframework.webflow.test.MockExternalContext; -import org.springframework.webflow.test.MockFlowBuilderContext; -import org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests; - -public class HotelBookingFlowExecutionTests extends AbstractXmlFlowExecutionTests { - - private HotelBookingAgent hotelBookingAgent; - - protected void setUp() { - hotelBookingAgent = EasyMock.createMock(HotelBookingAgent.class); - } - - @Override - protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) { - return resourceFactory.createFileResource("src/main/webapp/WEB-INF/hotel/booking/booking.xml"); - } - - @Override - protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) { - builderContext.registerBean("hotelBookingAgent", hotelBookingAgent); - builderContext.getFlowBuilderServices().setConversionService(new FacesConversionService()); - } - - public void testStartBookingFlow() { - HotelBooking booking = createTestBooking(); - - EasyMock.expect(hotelBookingAgent.createBooking(1L, "keith")).andReturn(booking); - EasyMock.replay(hotelBookingAgent); - - MutableAttributeMap input = new LocalAttributeMap(); - input.put("hotelId", "1"); - - MockExternalContext context = new MockExternalContext(); - context.setCurrentUser("keith"); - - startFlow(input, context); - - assertCurrentStateEquals("enterBookingDetails"); - assertResponseWrittenEquals("enterBookingDetails", context); - assertTrue(getRequiredFlowAttribute("booking") instanceof HotelBooking); - - EasyMock.verify(hotelBookingAgent); - } - - public void testEnterBookingDetails_Proceed() { - setCurrentState("enterBookingDetails"); - getFlowScope().put("booking", createTestBooking()); - - MockExternalContext context = new MockExternalContext(); - context.setEventId("proceed"); - resumeFlow(context); - - assertCurrentStateEquals("reviewBooking"); - assertResponseWrittenEquals("reviewBooking", context); - } - - public void testReviewBooking_Confirm() { - setCurrentState("reviewBooking"); - getFlowScope().put("booking", createTestBooking()); - MockExternalContext context = new MockExternalContext(); - context.setEventId("confirm"); - resumeFlow(context); - - assertFlowExecutionEnded(); - assertFlowExecutionOutcomeEquals("bookingConfirmed"); - } - - private HotelBooking createTestBooking() { - Hotel hotel = new Hotel(); - hotel.setId(1L); - hotel.setName("Jameson Inn"); - User user = new User("keith", "pass", "Keith Donald"); - HotelBooking booking = new HotelBooking(hotel, user); - return booking; - } - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/booking/impl/JpaHotelBookingAgentTests.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/booking/impl/JpaHotelBookingAgentTests.java deleted file mode 100644 index 4b4531ed..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/booking/impl/JpaHotelBookingAgentTests.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.springframework.samples.springtravel.hotel.booking.impl; - -import java.util.List; - -import org.springframework.samples.springtravel.hotel.booking.HotelBooking; -import org.springframework.samples.springtravel.hotel.booking.HotelBookingAgent; -import org.springframework.test.jpa.AbstractJpaTests; - - -public class JpaHotelBookingAgentTests extends AbstractJpaTests { - - private HotelBookingAgent hotelBookingAgent; - - @Override - protected String[] getConfigLocations() { - return new String[] { "classpath:/test-jpa-context.xml" }; - } - - public void setHotelBookingAgent(HotelBookingAgent hotelBookingAgent) { - this.hotelBookingAgent = hotelBookingAgent; - } - - @Override - protected void onSetUpInTransaction() throws Exception { - super.onSetUpInTransaction(); - hotelBookingAgent.createBooking(1L, "scott"); - } - - public void testCancelBooking() { - List bookings = hotelBookingAgent.findBookings("scott"); - assertEquals(1, bookings.size()); - hotelBookingAgent.cancelBooking(bookings.get(0).getId()); - bookings = hotelBookingAgent.findBookings("scott"); - assertEquals(0, bookings.size()); - } - - public void testCreateBooking() { - HotelBooking booking = hotelBookingAgent.createBooking(1L, "scott"); - assertEquals("Scott", booking.getUser().getName()); - assertEquals("Westin Diplomat", booking.getHotel().getName()); - } - - public void testFindBookings() { - List bookings = hotelBookingAgent.findBookings("scott"); - assertEquals(1, bookings.size()); - assertEquals("Westin Diplomat", bookings.get(0).getHotel().getName()); - } - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/search/HotelSearchFlowExecutionTests.java b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/search/HotelSearchFlowExecutionTests.java deleted file mode 100644 index 655f3265..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/java/org/springframework/samples/springtravel/hotel/search/HotelSearchFlowExecutionTests.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.springframework.samples.springtravel.hotel.search; - -import java.util.ArrayList; -import java.util.List; - -import javax.faces.model.DataModel; - -import org.easymock.EasyMock; -import org.springframework.binding.mapping.Mapper; -import org.springframework.binding.mapping.MappingResults; -import org.springframework.faces.model.OneSelectionTrackingListDataModel; -import org.springframework.faces.model.converter.FacesConversionService; -import org.springframework.samples.springtravel.hotel.booking.HotelBooking; -import org.springframework.samples.springtravel.hotel.booking.HotelBookingAgent; -import org.springframework.samples.springtravel.hotel.booking.User; -import org.springframework.webflow.config.FlowDefinitionResource; -import org.springframework.webflow.config.FlowDefinitionResourceFactory; -import org.springframework.webflow.core.collection.AttributeMap; -import org.springframework.webflow.engine.EndState; -import org.springframework.webflow.engine.Flow; -import org.springframework.webflow.test.MockExternalContext; -import org.springframework.webflow.test.MockFlowBuilderContext; -import org.springframework.webflow.test.execution.AbstractXmlFlowExecutionTests; - -public class HotelSearchFlowExecutionTests extends AbstractXmlFlowExecutionTests { - - private HotelSearchAgent hotelSearchAgent; - private HotelBookingAgent hotelBookingAgent; - - protected void setUp() { - hotelSearchAgent = EasyMock.createMock(HotelSearchAgent.class); - hotelBookingAgent = EasyMock.createMock(HotelBookingAgent.class); - } - - @Override - protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) { - return resourceFactory.createFileResource("src/main/webapp/WEB-INF/hotel/search/search.xml"); - } - - @Override - protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) { - builderContext.registerBean("hotelSearchAgent", hotelSearchAgent); - builderContext.registerBean("hotelBookingAgent", hotelBookingAgent); - builderContext.getFlowBuilderServices().setConversionService(new FacesConversionService()); - } - - public void testStartMainFlow() { - List bookings = new ArrayList(); - bookings.add(new HotelBooking(new Hotel(), new User("keith", "password", "Keith Donald"))); - EasyMock.expect(hotelBookingAgent.findBookings("keith")).andReturn(bookings); - EasyMock.replay(hotelBookingAgent); - - MockExternalContext context = new MockExternalContext(); - context.setCurrentUser("keith"); - startFlow(context); - assertCurrentStateEquals("enterSearchCriteria"); - assertResponseWrittenEquals("enterSearchCriteria", context); - assertTrue(getRequiredFlowAttribute("searchCriteria") instanceof SearchCriteria); - assertTrue(getRequiredViewAttribute("bookings") instanceof DataModel); - - EasyMock.verify(hotelBookingAgent); - } - - public void testSearchHotels() { - setCurrentState("enterSearchCriteria"); - - SearchCriteria criteria = new SearchCriteria(); - criteria.setSearchString("Jameson"); - getFlowScope().put("searchCriteria", criteria); - - List hotels = new ArrayList(); - hotels.add(new Hotel()); - EasyMock.expect(hotelSearchAgent.findHotels(criteria)).andReturn(hotels); - EasyMock.replay(hotelSearchAgent); - - MockExternalContext context = new MockExternalContext(); - context.setEventId("search"); - resumeFlow(context); - - EasyMock.verify(hotelSearchAgent); - - assertCurrentStateEquals("reviewHotels"); - assertResponseWrittenEquals("reviewHotels", context); - assertTrue(getRequiredViewAttribute("hotels") instanceof DataModel); - } - - public void testSelectHotel() { - setCurrentState("reviewHotels"); - - List hotels = new ArrayList(); - Hotel hotel = new Hotel(); - hotel.setId(1L); - hotel.setName("Jameson Inn"); - hotels.add(hotel); - OneSelectionTrackingListDataModel dataModel = new OneSelectionTrackingListDataModel(hotels); - dataModel.select(hotel); - getViewScope().put("hotels", dataModel); - - MockExternalContext context = new MockExternalContext(); - context.setEventId("select"); - resumeFlow(context); - - assertCurrentStateEquals("reviewHotel"); - assertNull(getFlowAttribute("hotels")); - assertSame(hotel, getFlowAttribute("hotel")); - } - - public void testBookHotel() { - setCurrentState("reviewHotel"); - - Hotel hotel = new Hotel(); - hotel.setId(1L); - hotel.setName("Jameson Inn"); - getFlowScope().put("hotel", hotel); - - Flow mockBookingFlow = new Flow("booking"); - mockBookingFlow.setInputMapper(new Mapper() { - public MappingResults map(Object source, Object target) { - assertEquals(new Long(1), ((AttributeMap) source).get("hotelId")); - return null; - } - }); - new EndState(mockBookingFlow, "bookingConfirmed"); - getFlowDefinitionRegistry().registerFlowDefinition(mockBookingFlow); - - MockExternalContext context = new MockExternalContext(); - context.setEventId("book"); - resumeFlow(context); - - assertFlowExecutionEnded(); - assertFlowExecutionOutcomeEquals("finish"); - } - -} diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/resources/test-booking-persistence.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/resources/test-booking-persistence.xml deleted file mode 100644 index 5049fd1d..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/resources/test-booking-persistence.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - org.hibernate.ejb.HibernatePersistence - org.springframework.samples.springtravel.hotel.booking.User - org.springframework.samples.springtravel.hotel.booking.HotelBooking - org.springframework.samples.springtravel.hotel.search.Hotel - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/resources/test-jpa-context.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/resources/test-jpa-context.xml deleted file mode 100644 index 10cf528d..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel.webapp/src/test/resources/test-jpa-context.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.project b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.project deleted file mode 100644 index c5289263..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.project +++ /dev/null @@ -1,24 +0,0 @@ - - - org.springframework.samples.springtravel - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - com.springsource.platform.ide.facet.core.parnature - org.springframework.ide.eclipse.core.springnature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/com.springsource.platform.ide.server.core.par.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/com.springsource.platform.ide.server.core.par.xml deleted file mode 100644 index 40b3a085..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/com.springsource.platform.ide.server.core.par.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index df2c698e..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.eclipse.wst.validation.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.eclipse.wst.validation.prefs deleted file mode 100644 index f8d7c790..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.eclipse.wst.validation.prefs +++ /dev/null @@ -1,54 +0,0 @@ -#Wed Apr 30 17:12:26 BST 2008 -DELEGATES_PREFERENCE=delegateValidatorList -USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; -USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; -USER_PREFERENCE=overrideGlobalPreferencesfalse -eclipse.preferences.version=1 -filters/org.eclipse.wst.wsdl.validation.wsdl/build=true -filters/org.eclipse.wst.wsdl.validation.wsdl/delegate=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator -filters/org.eclipse.wst.wsdl.validation.wsdl/groups/0/rules/0/case=false -filters/org.eclipse.wst.wsdl.validation.wsdl/groups/0/rules/0/pattern=wsdl -filters/org.eclipse.wst.wsdl.validation.wsdl/groups/0/rules/0/type=fileext -filters/org.eclipse.wst.wsdl.validation.wsdl/groups/0/type=include -filters/org.eclipse.wst.wsdl.validation.wsdl/manual=true -filters/org.eclipse.wst.wsdl.validation.wsdl/version=2 -filters/org.eclipse.wst.xml.core.xml/build=true -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/0/pattern=org.eclipse.jst.jsp.core.tldsource -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/0/type=contentType -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/1/pattern=org.eclipse.wst.xml.core.xslsource -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/1/type=contentType -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/2/pattern=org.eclipse.core.runtime.xml -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/2/type=contentType -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/3/pattern=org.eclipse.wst.xml.core.xmlsource -filters/org.eclipse.wst.xml.core.xml/groups/0/rules/3/type=contentType -filters/org.eclipse.wst.xml.core.xml/groups/0/type=include -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/0/case=true -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/0/fileType=1 -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/0/pattern=.classpath -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/0/type=file -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/1/case=true -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/1/fileType=1 -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/1/pattern=.project -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/1/type=file -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/2/pattern=org.eclipse.jst.j2ee.ejb.EJBNature -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/2/type=projectNature -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/3/case=true -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/3/fileType=2 -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/3/pattern=.settings -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/3/type=file -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/4/pattern=org.eclipse.jst.j2ee.EARNature -filters/org.eclipse.wst.xml.core.xml/groups/1/rules/4/type=projectNature -filters/org.eclipse.wst.xml.core.xml/groups/1/type=exclude -filters/org.eclipse.wst.xml.core.xml/manual=true -filters/org.eclipse.wst.xml.core.xml/version=3 -filters/org.eclipse.wst.xsd.core.xsd/build=true -filters/org.eclipse.wst.xsd.core.xsd/delegate=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator -filters/org.eclipse.wst.xsd.core.xsd/groups/0/rules/0/case=false -filters/org.eclipse.wst.xsd.core.xsd/groups/0/rules/0/pattern=xsd -filters/org.eclipse.wst.xsd.core.xsd/groups/0/rules/0/type=fileext -filters/org.eclipse.wst.xsd.core.xsd/groups/0/type=include -filters/org.eclipse.wst.xsd.core.xsd/manual=true -filters/org.eclipse.wst.xsd.core.xsd/version=2 -override=false -suspend=false -vf.version=2 diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.springframework.ide.eclipse.core.prefs b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.springframework.ide.eclipse.core.prefs deleted file mode 100644 index 10a332f1..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.settings/org.springframework.ide.eclipse.core.prefs +++ /dev/null @@ -1,49 +0,0 @@ -#Wed Apr 30 17:12:26 BST 2008 -eclipse.preferences.version=1 -org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true -org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=false -org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=true -org.springframework.ide.eclipse.core.enable.project.preferences=false -org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.bestpractices.beansvalidator=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.core.springvalidator=true -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.RefElementRule-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.springBeans b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.springBeans deleted file mode 100644 index 4a47426b..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/.springBeans +++ /dev/null @@ -1,13 +0,0 @@ - - - 1 - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/META-INF/MANIFEST.MF b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/META-INF/MANIFEST.MF deleted file mode 100644 index d555d015..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/META-INF/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Application-SymbolicName: org.springframework.samples.springtravel -Application-Version: 1.0.0 -Application-Name: Spring Travel PAR - diff --git a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/build.xml b/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/build.xml deleted file mode 100644 index 1746b347..00000000 --- a/spring-webflow-samples/spring-travel-platform/org.springframework.samples.springtravel/build.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-webflow-samples/spring-travel-platform/readme.txt b/spring-webflow-samples/spring-travel-platform/readme.txt deleted file mode 100644 index c8b19eef..00000000 --- a/spring-webflow-samples/spring-travel-platform/readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains a flavor of the Spring Travel Application that has been designed a set of OSGi bundles. In addition, the bundles have been packaged together as a .PAR for convenient deployment to the SpringSource Application Platform. - -Please note: THIS SAMPLE IS CURRENTLY A WORK IN PROGRESS. It is not fully functional as of this time, but is expected to be fully functional in the next Web Flow release and by the time version 1.0 of the SpringSource Application Platform is generally available.