diff --git a/booking-faces/src/main/java/org/springframework/webflow/samples/booking/Booking.java b/booking-faces/src/main/java/org/springframework/webflow/samples/booking/Booking.java index 5bbc7f0..84641b9 100755 --- a/booking-faces/src/main/java/org/springframework/webflow/samples/booking/Booking.java +++ b/booking-faces/src/main/java/org/springframework/webflow/samples/booking/Booking.java @@ -1,226 +1,226 @@ -package org.springframework.webflow.samples.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 javax.validation.constraints.Future; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - -import org.hibernate.validator.constraints.NotEmpty; -import org.springframework.binding.message.MessageBuilder; -import org.springframework.binding.message.MessageContext; -import org.springframework.binding.validation.ValidationContext; - -/** - * A Hotel Booking made by a User. - */ -@Entity -public class Booking implements Serializable { - - private static final long serialVersionUID = 1171567558348174963L; - - 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; - - private Amenity[] amenities; - - public Booking() { - } - - public Booking(Hotel hotel, User user) { - this.hotel = hotel; - this.user = user; - Calendar calendar = Calendar.getInstance(); - calendar.add(Calendar.DAY_OF_MONTH, 1); - setCheckinDate(calendar.getTime()); - calendar.add(Calendar.DAY_OF_MONTH, 1); - setCheckoutDate(calendar.getTime()); - } - - @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) - @Future - @NotNull - 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) - @Future - @NotNull - public Date getCheckoutDate() { - return checkoutDate; - } - - public void setCheckoutDate(Date checkoutDate) { - this.checkoutDate = checkoutDate; - } - - @Pattern(regexp = "[0-9]{16}", message = "{invalidCreditCardPattern}") - 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; - } - - @NotEmpty - 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; - } - - @Transient - public Amenity[] getAmenities() { - return amenities; - } - - public void setAmenities(Amenity[] amenities) { - this.amenities = amenities; - } - - public void validateEnterBookingDetails(ValidationContext context) { - MessageContext messages = context.getMessageContext(); - if (checkinDate.before(today())) { - messages.addMessage(new MessageBuilder().error().source("checkinDate") - .code("booking.checkinDate.beforeToday").build()); - } else if (checkoutDate.before(checkinDate)) { - messages.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 + ")"; - } - -} +package org.springframework.webflow.samples.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 javax.validation.constraints.Future; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + +import org.hibernate.validator.constraints.NotEmpty; +import org.springframework.binding.message.MessageBuilder; +import org.springframework.binding.message.MessageContext; +import org.springframework.binding.validation.ValidationContext; + +/** + * A Hotel Booking made by a User. + */ +@Entity +public class Booking implements Serializable { + + private static final long serialVersionUID = 1171567558348174963L; + + 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; + + private Amenity[] amenities; + + public Booking() { + } + + public Booking(Hotel hotel, User user) { + this.hotel = hotel; + this.user = user; + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH, 1); + setCheckinDate(calendar.getTime()); + calendar.add(Calendar.DAY_OF_MONTH, 1); + setCheckoutDate(calendar.getTime()); + } + + @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) + @Future + @NotNull + 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) + @Future + @NotNull + public Date getCheckoutDate() { + return checkoutDate; + } + + public void setCheckoutDate(Date checkoutDate) { + this.checkoutDate = checkoutDate; + } + + @Pattern(regexp = "[0-9]{16}", message = "{invalidCreditCardPattern}") + 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; + } + + @NotEmpty + 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; + } + + @Transient + public Amenity[] getAmenities() { + return amenities; + } + + public void setAmenities(Amenity[] amenities) { + this.amenities = amenities; + } + + public void validateEnterBookingDetails(ValidationContext context) { + MessageContext messages = context.getMessageContext(); + if (checkinDate.before(today())) { + messages.addMessage(new MessageBuilder().error().source("checkinDate") + .code("booking.checkinDate.beforeToday").build()); + } else if (checkoutDate.before(checkinDate)) { + messages.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/booking-faces/src/main/java/org/springframework/webflow/samples/booking/User.java b/booking-faces/src/main/java/org/springframework/webflow/samples/booking/User.java index 494e9dd..2a5d0a5 100755 --- a/booking-faces/src/main/java/org/springframework/webflow/samples/booking/User.java +++ b/booking-faces/src/main/java/org/springframework/webflow/samples/booking/User.java @@ -1,62 +1,62 @@ -package org.springframework.webflow.samples.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 + ")"; - } -} +package org.springframework.webflow.samples.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/booking-faces/src/main/resources/META-INF/persistence.xml b/booking-faces/src/main/resources/META-INF/persistence.xml index f4e3d6a..498b08c 100755 --- a/booking-faces/src/main/resources/META-INF/persistence.xml +++ b/booking-faces/src/main/resources/META-INF/persistence.xml @@ -1,8 +1,8 @@ - - + + org.hibernate.ejb.HibernatePersistence org.springframework.webflow.samples.booking.User diff --git a/booking-faces/src/main/resources/import.sql b/booking-faces/src/main/resources/import.sql index 9a7ed4a..e3211aa 100755 --- a/booking-faces/src/main/resources/import.sql +++ b/booking-faces/src/main/resources/import.sql @@ -1,27 +1,27 @@ -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 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/booking-faces/src/main/webapp/META-INF/MANIFEST.MF b/booking-faces/src/main/webapp/META-INF/MANIFEST.MF index 58630c0..59499bc 100644 --- a/booking-faces/src/main/webapp/META-INF/MANIFEST.MF +++ b/booking-faces/src/main/webapp/META-INF/MANIFEST.MF @@ -1,2 +1,2 @@ -Manifest-Version: 1.0 - +Manifest-Version: 1.0 + diff --git a/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml b/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml index 581e73b..2d654bc 100644 --- a/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml +++ b/booking-faces/src/main/webapp/WEB-INF/config/data-access-config.xml @@ -1,8 +1,8 @@ - - + diff --git a/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml b/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml index ef58ed9..6d200de 100644 --- a/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml +++ b/booking-faces/src/main/webapp/WEB-INF/config/security-config.xml @@ -4,7 +4,7 @@ xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd - http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> diff --git a/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml b/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml index 942c9c1..5791b17 100644 --- a/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml +++ b/booking-faces/src/main/webapp/WEB-INF/config/web-application-config.xml @@ -1,10 +1,10 @@ - - + + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> diff --git a/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml b/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml index 73b3f04..51efb44 100644 --- a/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml +++ b/booking-faces/src/main/webapp/WEB-INF/config/webflow-config.xml @@ -1,17 +1,17 @@ - - + + http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd"> - - - + + + @@ -23,11 +23,11 @@ - - + + - + \ No newline at end of file diff --git a/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml b/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml index 571e501..963c48f 100644 --- a/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml +++ b/booking-faces/src/main/webapp/WEB-INF/config/webmvc-config.xml @@ -1,36 +1,36 @@ - - + - - - - - - - - - - - - - + xmlns:faces="http://www.springframework.org/schema/faces" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/faces http://www.springframework.org/schema/faces/spring-faces-2.2.xsd"> + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/booking-faces/src/main/webapp/index.html b/booking-faces/src/main/webapp/index.html index fce3550..adf221b 100755 --- a/booking-faces/src/main/webapp/index.html +++ b/booking-faces/src/main/webapp/index.html @@ -1,5 +1,5 @@ - - - - + + + + \ No newline at end of file diff --git a/booking-faces/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css b/booking-faces/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css index 028e05b..fcfd55e 100755 --- a/booking-faces/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css +++ b/booking-faces/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css @@ -1,71 +1,71 @@ -/* -------------------------------------------------------------- - - fancy-type.css - * Lots of pretty advanced classes for manipulating text. - - See the Readme file in this folder for additional instructions. - --------------------------------------------------------------- */ - -/* Indentation instead of line shifts for sibling paragraphs. */ - p + p { text-indent:2em; margin-top:-1.5em; } - form p + p { text-indent: 0; } /* Don't want this in forms. */ - - -/* For great looking type, use this code instead of asdf: - asdf - Best used on prepositions and ampersands. */ - -.alt { - color: #666; - font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; - font-style: italic; - font-weight: normal; -} - - -/* For great looking quote marks in titles, replace "asdf" with: - asdf” - (That is, when the title starts with a quote mark). - (You may have to change this value depending on your font size). */ - -.dquo { margin-left: -.5em; } - - -/* Reduced size type with incremental leading - (http://www.markboulton.co.uk/journal/comments/incremental_leading/) - - This could be used for side notes. For smaller type, you don't necessarily want to - follow the 1.5x vertical rhythm -- the line-height is too much. - - Using this class, it reduces your font size and line-height so that for - every four lines of normal sized type, there is five lines of the sidenote. eg: - - New type size in em's: - 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) - - New line-height value: - 12px x 1.5 = 18px (old line-height) - 18px x 4 = 72px - 72px / 5 = 14.4px (new line height) - 14.4px / 10px = 1.44 (new line height in em's) */ - -p.incr, .incr p { - font-size: 10px; - line-height: 1.44em; - margin-bottom: 1.5em; -} - - -/* Surround uppercase words and abbreviations with this class. - Based on work by Jørgen Arnor GÃ¥rdsø Lom [http://twistedintellect.com/] */ - -.caps { - font-variant: small-caps; - letter-spacing: 1px; - text-transform: lowercase; - font-size:1.2em; - line-height:1%; - font-weight:bold; - padding:0 2px; -} +/* -------------------------------------------------------------- + + fancy-type.css + * Lots of pretty advanced classes for manipulating text. + + See the Readme file in this folder for additional instructions. + +-------------------------------------------------------------- */ + +/* Indentation instead of line shifts for sibling paragraphs. */ + p + p { text-indent:2em; margin-top:-1.5em; } + form p + p { text-indent: 0; } /* Don't want this in forms. */ + + +/* For great looking type, use this code instead of asdf: + asdf + Best used on prepositions and ampersands. */ + +.alt { + color: #666; + font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; + font-style: italic; + font-weight: normal; +} + + +/* For great looking quote marks in titles, replace "asdf" with: + asdf” + (That is, when the title starts with a quote mark). + (You may have to change this value depending on your font size). */ + +.dquo { margin-left: -.5em; } + + +/* Reduced size type with incremental leading + (http://www.markboulton.co.uk/journal/comments/incremental_leading/) + + This could be used for side notes. For smaller type, you don't necessarily want to + follow the 1.5x vertical rhythm -- the line-height is too much. + + Using this class, it reduces your font size and line-height so that for + every four lines of normal sized type, there is five lines of the sidenote. eg: + + New type size in em's: + 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) + + New line-height value: + 12px x 1.5 = 18px (old line-height) + 18px x 4 = 72px + 72px / 5 = 14.4px (new line height) + 14.4px / 10px = 1.44 (new line height in em's) */ + +p.incr, .incr p { + font-size: 10px; + line-height: 1.44em; + margin-bottom: 1.5em; +} + + +/* Surround uppercase words and abbreviations with this class. + Based on work by Jørgen Arnor GÃ¥rdsø Lom [http://twistedintellect.com/] */ + +.caps { + font-variant: small-caps; + letter-spacing: 1px; + text-transform: lowercase; + font-size:1.2em; + line-height:1%; + font-weight:bold; + padding:0 2px; +} diff --git a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java index b25931c..084ee9b 100755 --- a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java +++ b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/Booking.java @@ -1,215 +1,215 @@ -package org.springframework.webflow.samples.booking; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.text.DateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.Set; - -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 javax.validation.constraints.Future; -import javax.validation.constraints.NotNull; - -import org.hibernate.validator.constraints.NotEmpty; -import org.springframework.format.annotation.DateTimeFormat; - -/** - * A Hotel Booking made by a User. - */ -@Entity -@BookingDateRange -public class Booking implements Serializable { - - private Long id; - - private User user; - - private Hotel hotel; - - @DateTimeFormat(pattern = "MM-dd-yyyy") - private Date checkinDate; - - @DateTimeFormat(pattern = "MM-dd-yyyy") - private Date checkoutDate; - - private String creditCard; - - private String creditCardName; - - private int creditCardExpiryMonth; - - private int creditCardExpiryYear; - - private boolean smoking; - - private int beds; - - private Set amenities; - - public Booking() { - Calendar calendar = Calendar.getInstance(); - calendar.add(Calendar.DAY_OF_MONTH, 1); - setCheckinDate(calendar.getTime()); - calendar.add(Calendar.DAY_OF_MONTH, 1); - setCheckoutDate(calendar.getTime()); - } - - public Booking(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) - @NotNull - @Future - 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) - @NotNull - @Future - public Date getCheckoutDate() { - return checkoutDate; - } - - public void setCheckoutDate(Date checkoutDate) { - this.checkoutDate = checkoutDate; - } - - @NotEmpty - 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; - } - - @NotEmpty - 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; - } - - @Transient - public Set getAmenities() { - return amenities; - } - - public void setAmenities(Set amenities) { - this.amenities = amenities; - } - - 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 + ")"; - } - -} +package org.springframework.webflow.samples.booking; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.Set; + +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 javax.validation.constraints.Future; +import javax.validation.constraints.NotNull; + +import org.hibernate.validator.constraints.NotEmpty; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * A Hotel Booking made by a User. + */ +@Entity +@BookingDateRange +public class Booking implements Serializable { + + private Long id; + + private User user; + + private Hotel hotel; + + @DateTimeFormat(pattern = "MM-dd-yyyy") + private Date checkinDate; + + @DateTimeFormat(pattern = "MM-dd-yyyy") + private Date checkoutDate; + + private String creditCard; + + private String creditCardName; + + private int creditCardExpiryMonth; + + private int creditCardExpiryYear; + + private boolean smoking; + + private int beds; + + private Set amenities; + + public Booking() { + Calendar calendar = Calendar.getInstance(); + calendar.add(Calendar.DAY_OF_MONTH, 1); + setCheckinDate(calendar.getTime()); + calendar.add(Calendar.DAY_OF_MONTH, 1); + setCheckoutDate(calendar.getTime()); + } + + public Booking(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) + @NotNull + @Future + 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) + @NotNull + @Future + public Date getCheckoutDate() { + return checkoutDate; + } + + public void setCheckoutDate(Date checkoutDate) { + this.checkoutDate = checkoutDate; + } + + @NotEmpty + 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; + } + + @NotEmpty + 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; + } + + @Transient + public Set getAmenities() { + return amenities; + } + + public void setAmenities(Set amenities) { + this.amenities = amenities; + } + + 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/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/User.java b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/User.java index 55213ad..bb4a856 100755 --- a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/User.java +++ b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/User.java @@ -1,59 +1,59 @@ -package org.springframework.webflow.samples.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 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 + ")"; - } -} +package org.springframework.webflow.samples.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 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/booking-mvc/src/main/resources/META-INF/persistence.xml b/booking-mvc/src/main/resources/META-INF/persistence.xml index f4e3d6a..498b08c 100755 --- a/booking-mvc/src/main/resources/META-INF/persistence.xml +++ b/booking-mvc/src/main/resources/META-INF/persistence.xml @@ -1,8 +1,8 @@ - - + + org.hibernate.ejb.HibernatePersistence org.springframework.webflow.samples.booking.User diff --git a/booking-mvc/src/main/webapp/META-INF/MANIFEST.MF b/booking-mvc/src/main/webapp/META-INF/MANIFEST.MF index 58630c0..59499bc 100644 --- a/booking-mvc/src/main/webapp/META-INF/MANIFEST.MF +++ b/booking-mvc/src/main/webapp/META-INF/MANIFEST.MF @@ -1,2 +1,2 @@ -Manifest-Version: 1.0 - +Manifest-Version: 1.0 + diff --git a/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml b/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml index 94e2bae..1a6d00f 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/config/data-access-config.xml @@ -1,8 +1,8 @@ - - + @@ -19,14 +19,14 @@ - - - - hibernate.session_factory_name=mySessionFactory - - - + + + hibernate.session_factory_name=mySessionFactory + + + + diff --git a/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml b/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml index 9a5df65..88fbd06 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/config/security-config.xml @@ -4,7 +4,7 @@ xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd - http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> diff --git a/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml b/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml index 7dcaeed..f6589f7 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/config/webflow-config.xml @@ -1,37 +1,37 @@ - - + + xsi:schemaLocation=" + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd + http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd"> - + - + - - + - + - - + + \ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml b/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml index 56e56fd..7a6ff19 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/config/webmvc-config.xml @@ -1,48 +1,48 @@ - - + - - - - - - - - - - - - - - - - - - + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> + + + + + + + + + + + + + + + + + + - - - - - - /WEB-INF/**/views.xml - - - + + + + + + /WEB-INF/**/views.xml + + + - - - - - - - + + + + + + + \ No newline at end of file diff --git a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml index ff62d70..e706bb2 100644 --- a/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml +++ b/booking-mvc/src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml @@ -1,50 +1,50 @@ - - - - - + + + + + - + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - - - + + + + + + - - + + - + \ No newline at end of file diff --git a/booking-mvc/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css b/booking-mvc/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css index 028e05b..fcfd55e 100755 --- a/booking-mvc/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css +++ b/booking-mvc/src/main/webapp/styles/blueprint/plugins/fancy-type/screen.css @@ -1,71 +1,71 @@ -/* -------------------------------------------------------------- - - fancy-type.css - * Lots of pretty advanced classes for manipulating text. - - See the Readme file in this folder for additional instructions. - --------------------------------------------------------------- */ - -/* Indentation instead of line shifts for sibling paragraphs. */ - p + p { text-indent:2em; margin-top:-1.5em; } - form p + p { text-indent: 0; } /* Don't want this in forms. */ - - -/* For great looking type, use this code instead of asdf: - asdf - Best used on prepositions and ampersands. */ - -.alt { - color: #666; - font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; - font-style: italic; - font-weight: normal; -} - - -/* For great looking quote marks in titles, replace "asdf" with: - asdf” - (That is, when the title starts with a quote mark). - (You may have to change this value depending on your font size). */ - -.dquo { margin-left: -.5em; } - - -/* Reduced size type with incremental leading - (http://www.markboulton.co.uk/journal/comments/incremental_leading/) - - This could be used for side notes. For smaller type, you don't necessarily want to - follow the 1.5x vertical rhythm -- the line-height is too much. - - Using this class, it reduces your font size and line-height so that for - every four lines of normal sized type, there is five lines of the sidenote. eg: - - New type size in em's: - 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) - - New line-height value: - 12px x 1.5 = 18px (old line-height) - 18px x 4 = 72px - 72px / 5 = 14.4px (new line height) - 14.4px / 10px = 1.44 (new line height in em's) */ - -p.incr, .incr p { - font-size: 10px; - line-height: 1.44em; - margin-bottom: 1.5em; -} - - -/* Surround uppercase words and abbreviations with this class. - Based on work by Jørgen Arnor GÃ¥rdsø Lom [http://twistedintellect.com/] */ - -.caps { - font-variant: small-caps; - letter-spacing: 1px; - text-transform: lowercase; - font-size:1.2em; - line-height:1%; - font-weight:bold; - padding:0 2px; -} +/* -------------------------------------------------------------- + + fancy-type.css + * Lots of pretty advanced classes for manipulating text. + + See the Readme file in this folder for additional instructions. + +-------------------------------------------------------------- */ + +/* Indentation instead of line shifts for sibling paragraphs. */ + p + p { text-indent:2em; margin-top:-1.5em; } + form p + p { text-indent: 0; } /* Don't want this in forms. */ + + +/* For great looking type, use this code instead of asdf: + asdf + Best used on prepositions and ampersands. */ + +.alt { + color: #666; + font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; + font-style: italic; + font-weight: normal; +} + + +/* For great looking quote marks in titles, replace "asdf" with: + asdf” + (That is, when the title starts with a quote mark). + (You may have to change this value depending on your font size). */ + +.dquo { margin-left: -.5em; } + + +/* Reduced size type with incremental leading + (http://www.markboulton.co.uk/journal/comments/incremental_leading/) + + This could be used for side notes. For smaller type, you don't necessarily want to + follow the 1.5x vertical rhythm -- the line-height is too much. + + Using this class, it reduces your font size and line-height so that for + every four lines of normal sized type, there is five lines of the sidenote. eg: + + New type size in em's: + 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) + + New line-height value: + 12px x 1.5 = 18px (old line-height) + 18px x 4 = 72px + 72px / 5 = 14.4px (new line height) + 14.4px / 10px = 1.44 (new line height in em's) */ + +p.incr, .incr p { + font-size: 10px; + line-height: 1.44em; + margin-bottom: 1.5em; +} + + +/* Surround uppercase words and abbreviations with this class. + Based on work by Jørgen Arnor GÃ¥rdsø Lom [http://twistedintellect.com/] */ + +.caps { + font-variant: small-caps; + letter-spacing: 1px; + text-transform: lowercase; + font-size:1.2em; + line-height:1%; + font-weight:bold; + padding:0 2px; +} diff --git a/booking-portlet-faces/src/main/resources/META-INF/persistence.xml b/booking-portlet-faces/src/main/resources/META-INF/persistence.xml index f4e3d6a..498b08c 100644 --- a/booking-portlet-faces/src/main/resources/META-INF/persistence.xml +++ b/booking-portlet-faces/src/main/resources/META-INF/persistence.xml @@ -1,8 +1,8 @@ - - + + org.hibernate.ejb.HibernatePersistence org.springframework.webflow.samples.booking.User diff --git a/booking-portlet-faces/src/main/webapp/WEB-INF/config/application-config.xml b/booking-portlet-faces/src/main/webapp/WEB-INF/config/application-config.xml index 295df2e..b291c6f 100644 --- a/booking-portlet-faces/src/main/webapp/WEB-INF/config/application-config.xml +++ b/booking-portlet-faces/src/main/webapp/WEB-INF/config/application-config.xml @@ -1,10 +1,10 @@ - - + - + + org.hibernate.ejb.HibernatePersistence org.springframework.webflow.samples.booking.User diff --git a/booking-portlet-mvc/src/main/webapp/META-INF/MANIFEST.MF b/booking-portlet-mvc/src/main/webapp/META-INF/MANIFEST.MF index 58630c0..59499bc 100644 --- a/booking-portlet-mvc/src/main/webapp/META-INF/MANIFEST.MF +++ b/booking-portlet-mvc/src/main/webapp/META-INF/MANIFEST.MF @@ -1,2 +1,2 @@ -Manifest-Version: 1.0 - +Manifest-Version: 1.0 + diff --git a/booking-portlet-mvc/src/main/webapp/WEB-INF/config/application-config.xml b/booking-portlet-mvc/src/main/webapp/WEB-INF/config/application-config.xml index 02faf83..60ef7b2 100644 --- a/booking-portlet-mvc/src/main/webapp/WEB-INF/config/application-config.xml +++ b/booking-portlet-mvc/src/main/webapp/WEB-INF/config/application-config.xml @@ -1,10 +1,10 @@ - - + + http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd"> diff --git a/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/booking/reviewBooking.jsp b/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/booking/reviewBooking.jsp index d95fbaa..bea6a85 100644 --- a/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/booking/reviewBooking.jsp +++ b/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/booking/reviewBooking.jsp @@ -31,11 +31,11 @@ Country: ${booking.hotel.country} - - Total payment: + + Total payment: - ${status.value} - + ${status.value} + Check In Date: diff --git a/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.jsp b/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.jsp index 84bc87a..4d00322 100644 --- a/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.jsp +++ b/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/enterSearchCriteria.jsp @@ -5,7 +5,7 @@ - +

Search Hotels

diff --git a/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/reviewHotel.jsp b/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/reviewHotel.jsp index a617049..9d1a051 100644 --- a/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/reviewHotel.jsp +++ b/booking-portlet-mvc/src/main/webapp/WEB-INF/flows/main/reviewHotel.jsp @@ -36,11 +36,11 @@ Country: ${hotel.country} - - Nightly rate: + + Nightly rate: - ${status.value} - + ${status.value} +