struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1400220 [3/9] - in /struts/struts2/trunk/apps/showcase: ./ src/main/java/org/apache/struts2/showcase/ src/main/java/org/apache/struts2/showcase/action/ src/main/java/org/apache/struts2/showcase/actionchaining/ src/main/java/org/apache/stru...
Date Fri, 19 Oct 2012 18:49:48 GMT
Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/SendMessageToRoomAction.java Fri Oct 19 18:49:39 2012
@@ -20,51 +20,56 @@
  */
 package org.apache.struts2.showcase.chat;
 
-import java.util.Map;
-
+import com.opensymphony.xwork2.ActionSupport;
 import org.apache.struts2.interceptor.SessionAware;
 
-import com.opensymphony.xwork2.ActionSupport;
+import java.util.Map;
 
 public class SendMessageToRoomAction extends ActionSupport implements SessionAware {
 
-    private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
+
+	private ChatService chatService;
+
+	private String roomName;
+	private String message;
+	private Map session;
+
+
+	public SendMessageToRoomAction(ChatService chatService) {
+		this.chatService = chatService;
+	}
+
+	public String getRoomName() {
+		return this.roomName;
+	}
+
+	public void setRoomName(String roomName) {
+		this.roomName = roomName;
+	}
+
+	public String getMessage() {
+		return this.message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
 
-    private ChatService chatService;
+	public String execute() throws Exception {
+		User user = (User) session.get(ChatAuthenticationInterceptor.USER_SESSION_KEY);
+		try {
+			chatService.sendMessageToRoom(roomName, user, message);
+		} catch (ChatException e) {
+			addActionError(e.getMessage());
+		}
+		return SUCCESS;
+	}
 
-    private String roomName;
-    private String message;
-    private Map session;
-
-
-    public SendMessageToRoomAction(ChatService chatService) {
-        this.chatService = chatService;
-    }
-
-    public String getRoomName() { return this.roomName; }
-    public void setRoomName(String roomName) {
-        this.roomName = roomName;
-    }
-
-    public String getMessage() { return this.message; }
-    public void setMessage(String message) {
-        this.message = message;
-    }
-
-
-    public String execute() throws Exception {
-        User user = (User) session.get(ChatAuthenticationInterceptor.USER_SESSION_KEY);
-        try {
-            chatService.sendMessageToRoom(roomName, user, message);
-        }catch(ChatException e) {
-            addActionError(e.getMessage());
-        }
-        return SUCCESS;
-    }
-
-    public void setSession(Map session) {
-        this.session = session;
-    }
+	public void setSession(Map session) {
+		this.session = session;
+	}
 
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/User.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/User.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/User.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/User.java Fri Oct 19 18:49:39 2012
@@ -26,23 +26,24 @@ import java.util.Date;
 /**
  * Represends a user in the Chat example.
  */
-public class User implements Serializable  {
+public class User implements Serializable {
 
-    private static final long serialVersionUID = -1434958919516089297L;
+	private static final long serialVersionUID = -1434958919516089297L;
 
-    private String name;
-    private Date creationDate;
+	private String name;
+	private Date creationDate;
 
 
-    public User(String name) {
-        this.name = name;
-        this.creationDate = new Date(System.currentTimeMillis());
-    }
+	public User(String name) {
+		this.name = name;
+		this.creationDate = new Date(System.currentTimeMillis());
+	}
 
-    public Date getCreationDate() {
-        return creationDate;
-    }
-    public String getName() {
-        return name;
-    }
+	public Date getCreationDate() {
+		return creationDate;
+	}
+
+	public String getName() {
+		return name;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableAction.java Fri Oct 19 18:49:39 2012
@@ -20,30 +20,30 @@
  */
 package org.apache.struts2.showcase.chat;
 
+import com.opensymphony.xwork2.ActionSupport;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import com.opensymphony.xwork2.ActionSupport;
-
 public class UsersAvailableAction extends ActionSupport {
 
-    private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
 
-    private List<User> availableUsers = new ArrayList<User>();
-    private ChatService chatService;
+	private List<User> availableUsers = new ArrayList<User>();
+	private ChatService chatService;
 
-    public UsersAvailableAction(ChatService chatService) {
-        this.chatService = chatService;
-    }
+	public UsersAvailableAction(ChatService chatService) {
+		this.chatService = chatService;
+	}
 
-    public String execute() throws Exception {
+	public String execute() throws Exception {
 
-        availableUsers = chatService.getAvailableUsers();
+		availableUsers = chatService.getAvailableUsers();
 
-        return SUCCESS;
-    }
+		return SUCCESS;
+	}
 
-    public List<User> getAvailableUsers() {
-        return availableUsers;
-    }
+	public List<User> getAvailableUsers() {
+		return availableUsers;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/UsersAvailableInRoomAction.java Fri Oct 19 18:49:39 2012
@@ -20,42 +20,44 @@
  */
 package org.apache.struts2.showcase.chat;
 
+import com.opensymphony.xwork2.ActionSupport;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import com.opensymphony.xwork2.ActionSupport;
-
 public class UsersAvailableInRoomAction extends ActionSupport {
 
-    private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
 
-    private ChatService chatService;
-    private List<User> usersAvailableInRoom = new ArrayList<User>();
+	private ChatService chatService;
+	private List<User> usersAvailableInRoom = new ArrayList<User>();
 
-    private String roomName;
+	private String roomName;
 
-    public UsersAvailableInRoomAction(ChatService chatService) {
-        this.chatService = chatService;
-    }
-
-
-    public String getRoomName() { return this.roomName; }
-    public void setRoomName(String roomName) {
-        this.roomName = roomName;
-    }
-
-    public List<User> getUsersAvailableInRoom() {
-        return usersAvailableInRoom;
-    }
-
-    public String execute() throws Exception {
-        try {
-            usersAvailableInRoom = chatService.getUsersAvailableInRoom(roomName);
-        }
-        catch(ChatException e) {
-            addActionError(e.getMessage());
-        }
-        return SUCCESS;
-    }
+	public UsersAvailableInRoomAction(ChatService chatService) {
+		this.chatService = chatService;
+	}
+
+
+	public String getRoomName() {
+		return this.roomName;
+	}
+
+	public void setRoomName(String roomName) {
+		this.roomName = roomName;
+	}
+
+	public List<User> getUsersAvailableInRoom() {
+		return usersAvailableInRoom;
+	}
+
+	public String execute() throws Exception {
+		try {
+			usersAvailableInRoom = chatService.getUsersAvailableInRoom(roomName);
+		} catch (ChatException e) {
+			addActionError(e.getMessage());
+		}
+		return SUCCESS;
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Address.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Address.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Address.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Address.java Fri Oct 19 18:49:39 2012
@@ -26,13 +26,23 @@ package org.apache.struts2.showcase.conv
  */
 public class Address {
 
-    private String id;
-    private String address;
+	private String id;
+	private String address;
 
-    public String getId() { return id; }
-    public void setId(String id) { this.id = id; }
+	public String getId() {
+		return id;
+	}
 
-    public String getAddress() { return address; }
-    public void setAddress(String address) { this.address = address; }
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getAddress() {
+		return address;
+	}
+
+	public void setAddress(String address) {
+		this.address = address;
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/AddressAction.java Fri Oct 19 18:49:39 2012
@@ -20,28 +20,32 @@
  */
 package org.apache.struts2.showcase.conversion;
 
+import com.opensymphony.xwork2.ActionSupport;
+
 import java.util.LinkedHashSet;
 import java.util.Set;
 
-import com.opensymphony.xwork2.ActionSupport;
-
 /**
  * @version $Date$ $Id$
  */
 public class AddressAction extends ActionSupport {
 
-    private Set addresses = new LinkedHashSet();
-
-    public Set getAddresses() { return addresses; }
-    public void setAddresses(Set addresses) { this.addresses = addresses; }
-
-
-    public String input() throws Exception {
-        return SUCCESS;
-    }
+	private Set<Address> addresses = new LinkedHashSet<Address>();
 
-    public String submit() throws Exception {
-        System.out.println(addresses);
-        return SUCCESS;
-    }
+	public String input() throws Exception {
+		return SUCCESS;
+	}
+
+	public String submit() throws Exception {
+		System.out.println(addresses);
+		return SUCCESS;
+	}
+
+	public Set<Address> getAddresses() {
+		return addresses;
+	}
+
+	public void setAddresses(Set<Address> addresses) {
+		this.addresses = addresses;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/EnumTypeConverter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/EnumTypeConverter.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/EnumTypeConverter.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/EnumTypeConverter.java Fri Oct 19 18:49:39 2012
@@ -20,39 +20,39 @@
  */
 package org.apache.struts2.showcase.conversion;
 
+import org.apache.struts2.util.StrutsTypeConverter;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.struts2.util.StrutsTypeConverter;
-
 /**
  * @version $Date$ $Id$
  */
 public class EnumTypeConverter extends StrutsTypeConverter {
 
-    @Override
-    public Object convertFromString(Map context, String[] values, Class toClass) {
-        List<Enum> result = new ArrayList<Enum>();
-        for (int a=0; a< values.length; a++) {
-            Enum e = Enum.valueOf(OperationsEnum.class, values[a]);
-            if (e != null)
-                result.add(e);
-        }
-        return result;
-    }
-
-    @Override
-    public String convertToString(Map context, Object o) {
-        List l = (List) o;
-        String result ="<";
-        for (Iterator i = l.iterator(); i.hasNext(); ) {
-            result = result + "["+ i.next() +"]";
-        }
-        result = result+">";
-        return result;
-    }
+	@Override
+	public Object convertFromString(Map context, String[] values, Class toClass) {
+		List<Enum> result = new ArrayList<Enum>();
+		for (int a = 0; a < values.length; a++) {
+			Enum e = Enum.valueOf(OperationsEnum.class, values[a]);
+			if (e != null)
+				result.add(e);
+		}
+		return result;
+	}
+
+	@Override
+	public String convertToString(Map context, Object o) {
+		List l = (List) o;
+		String result = "<";
+		for (Iterator i = l.iterator(); i.hasNext(); ) {
+			result = result + "[" + i.next() + "]";
+		}
+		result = result + ">";
+		return result;
+	}
 
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnum.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnum.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnum.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnum.java Fri Oct 19 18:49:39 2012
@@ -21,13 +21,12 @@
 package org.apache.struts2.showcase.conversion;
 
 /**
- *
  * @version $Date$ $Id$
  */
 public enum OperationsEnum {
-    ADD,
-    MINUS,
-    DIVIDE,
-    MULTIPLY,
-    REMAINDER;
+	ADD,
+	MINUS,
+	DIVIDE,
+	MULTIPLY,
+	REMAINDER;
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/OperationsEnumAction.java Fri Oct 19 18:49:39 2012
@@ -20,37 +20,40 @@
  */
 package org.apache.struts2.showcase.conversion;
 
+import com.opensymphony.xwork2.ActionSupport;
+
 import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 
-import com.opensymphony.xwork2.ActionSupport;
-
 /**
- *
  * @version $Date$ $Id$
  */
 public class OperationsEnumAction extends ActionSupport {
 
-    private static final long serialVersionUID = -2229489704988870318L;
+	private static final long serialVersionUID = -2229489704988870318L;
+
+	private List<OperationsEnum> selectedOperations = new LinkedList<OperationsEnum>();
+
+	public String input() throws Exception {
+		return SUCCESS;
+	}
+
+	public String submit() throws Exception {
+		return SUCCESS;
+	}
+
+	public List<OperationsEnum> getSelectedOperations() {
+		return this.selectedOperations;
+	}
+
+	public void setSelectedOperations(List<OperationsEnum> selectedOperations) {
+		this.selectedOperations = selectedOperations;
+	}
 
-    private List<OperationsEnum> selectedOperations = new LinkedList<OperationsEnum>();
 
-    public List<OperationsEnum> getSelectedOperations() { return this.selectedOperations; }
-    public void setSelectedOperations(List<OperationsEnum> selectedOperations) {
-        this.selectedOperations = selectedOperations;
-    }
-
-
-    public List<OperationsEnum> getAvailableOperations() {
-        return Arrays.asList(OperationsEnum.values());
-    }
-
-    public String input() throws Exception {
-        return SUCCESS;
-    }
-    public String submit() throws Exception {
-        return SUCCESS;
-    }
+	public List<OperationsEnum> getAvailableOperations() {
+		return Arrays.asList(OperationsEnum.values());
+	}
 }
 

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Person.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Person.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Person.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/Person.java Fri Oct 19 18:49:39 2012
@@ -22,16 +22,23 @@ package org.apache.struts2.showcase.conv
 
 import java.io.Serializable;
 
-/**
- *
- */
 public class Person implements Serializable {
-    private String name;
-    private Integer age;
+	private String name;
+	private Integer age;
 
-    public void setName(String name) { this.name = name; }
-    public String getName() { return this.name; }
+	public void setName(String name) {
+		this.name = name;
+	}
 
-    public void setAge(Integer age) { this.age = age; }
-    public Integer getAge() { return this.age; }
+	public String getName() {
+		return this.name;
+	}
+
+	public void setAge(Integer age) {
+		this.age = age;
+	}
+
+	public Integer getAge() {
+		return this.age;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/conversion/PersonAction.java Fri Oct 19 18:49:39 2012
@@ -20,27 +20,28 @@
  */
 package org.apache.struts2.showcase.conversion;
 
-import java.util.List;
-
 import com.opensymphony.xwork2.ActionSupport;
 
-/**
- *
- */
-public class PersonAction extends ActionSupport {
-
-    private List persons;
-
-    public List getPersons() { return persons; }
-    public void setPersons(List persons) { this.persons = persons; }
+import java.util.List;
 
+public class PersonAction extends ActionSupport {
 
+	private List<Person> persons;
 
-    public String input() throws Exception {
-        return SUCCESS;
-    }
+	public String input() throws Exception {
+		return SUCCESS;
+	}
+
+	public String submit() throws Exception {
+		return SUCCESS;
+	}
+
+	public List<Person> getPersons() {
+		return persons;
+	}
+
+	public void setPersons(List<Person> persons) {
+		this.persons = persons;
+	}
 
-    public String submit() throws Exception {
-        return SUCCESS;
-    }
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/AbstractDao.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/AbstractDao.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/AbstractDao.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/AbstractDao.java Fri Oct 19 18:49:39 2012
@@ -20,58 +20,59 @@
  */
 package org.apache.struts2.showcase.dao;
 
-import java.io.Serializable;
-import java.util.Collection;
-
 import org.apache.struts2.showcase.application.Storage;
 import org.apache.struts2.showcase.exception.CreateException;
 import org.apache.struts2.showcase.exception.StorageException;
 import org.apache.struts2.showcase.exception.UpdateException;
 import org.apache.struts2.showcase.model.IdEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.io.Serializable;
+import java.util.Collection;
 
 /**
  * AbstractDao.
- *
  */
 
 public abstract class AbstractDao implements Serializable, Dao {
 
-    private Storage storage;
+	@Autowired
+	private Storage storage;
 
-    public Storage getStorage() {
-        return storage;
-    }
-
-    public void setStorage(Storage storage) {
-        this.storage = storage;
-    }
-
-    public IdEntity get(Serializable id) {
-        return getStorage().get(getFeaturedClass(), id);
-    }
-
-    public Serializable create(IdEntity object) throws CreateException {
-        return getStorage().create(object);
-    }
-
-    public IdEntity update(IdEntity object) throws UpdateException {
-        return getStorage().update(object);
-    }
-
-    public Serializable merge(IdEntity object) throws StorageException {
-        return getStorage().merge(object);
-    }
-
-    public int delete(Serializable id) throws CreateException {
-        return getStorage().delete(getFeaturedClass(), id);
-    }
-
-    public int delete(IdEntity object) throws CreateException {
-        return getStorage().delete(object);
-    }
-
-    public Collection findAll() {
-        return getStorage().findAll(getFeaturedClass());
-    }
+	public Storage getStorage() {
+		return storage;
+	}
+
+	public void setStorage(Storage storage) {
+		this.storage = storage;
+	}
+
+	public IdEntity get(Serializable id) {
+		return getStorage().get(getFeaturedClass(), id);
+	}
+
+	public Serializable create(IdEntity object) throws CreateException {
+		return getStorage().create(object);
+	}
+
+	public IdEntity update(IdEntity object) throws UpdateException {
+		return getStorage().update(object);
+	}
+
+	public Serializable merge(IdEntity object) throws StorageException {
+		return getStorage().merge(object);
+	}
+
+	public int delete(Serializable id) throws CreateException {
+		return getStorage().delete(getFeaturedClass(), id);
+	}
+
+	public int delete(IdEntity object) throws CreateException {
+		return getStorage().delete(object);
+	}
+
+	public Collection findAll() {
+		return getStorage().findAll(getFeaturedClass());
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/Dao.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/Dao.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/Dao.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/Dao.java Fri Oct 19 18:49:39 2012
@@ -20,34 +20,33 @@
  */
 package org.apache.struts2.showcase.dao;
 
-import java.io.Serializable;
-import java.util.Collection;
-
 import org.apache.struts2.showcase.exception.CreateException;
 import org.apache.struts2.showcase.exception.StorageException;
 import org.apache.struts2.showcase.exception.UpdateException;
 import org.apache.struts2.showcase.model.IdEntity;
 
+import java.io.Serializable;
+import java.util.Collection;
+
 /**
  * Dao. Interface.
- *
  */
 
 public interface Dao {
 
-    Class getFeaturedClass();
+	Class getFeaturedClass();
 
-    IdEntity get(Serializable id);
+	IdEntity get(Serializable id);
 
-    Serializable create(IdEntity object) throws CreateException;
+	Serializable create(IdEntity object) throws CreateException;
 
-    IdEntity update(IdEntity object) throws UpdateException;
+	IdEntity update(IdEntity object) throws UpdateException;
 
-    Serializable merge(IdEntity object) throws StorageException;
+	Serializable merge(IdEntity object) throws StorageException;
 
-    int delete(Serializable id) throws CreateException;
+	int delete(Serializable id) throws CreateException;
 
-    int delete(IdEntity object) throws CreateException;
+	int delete(IdEntity object) throws CreateException;
 
-    Collection findAll();
+	Collection findAll();
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/EmployeeDao.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/EmployeeDao.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/EmployeeDao.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/EmployeeDao.java Fri Oct 19 18:49:39 2012
@@ -20,48 +20,50 @@
  */
 package org.apache.struts2.showcase.dao;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.struts2.showcase.model.Employee;
 import org.apache.struts2.showcase.model.Skill;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * EmployeeDao.
- *
  */
-
+@Repository
 public class EmployeeDao extends AbstractDao {
 
-    private static final long serialVersionUID = -6615310540042830594L;
+	private static final long serialVersionUID = -6615310540042830594L;
 
-    protected SkillDao skillDao;
+	@Autowired
+	protected SkillDao skillDao;
 
-    public void setSkillDao(SkillDao skillDao) {
-        this.skillDao = skillDao;
-    }
-
-    public Class getFeaturedClass() {
-        return Employee.class;
-    }
-
-    public Employee getEmployee( Long id ) {
-        return (Employee) get(id);
-    }
-
-    public Employee setSkills(Employee employee, List skillNames) {
-        if (employee!= null && skillNames != null) {
-            employee.setOtherSkills(new ArrayList());
-            for (int i = 0, j = skillNames.size(); i < j; i++) {
-                Skill skill = (Skill) skillDao.get((String) skillNames.get(i));
-                employee.getOtherSkills().add(skill);
-            }
-        }
-        return employee;
-    }
-
-    public Employee setSkills(Long empId, List skillNames) {
-        return setSkills((Employee) get(empId), skillNames);
-    }
+	public void setSkillDao(SkillDao skillDao) {
+		this.skillDao = skillDao;
+	}
+
+	public Class getFeaturedClass() {
+		return Employee.class;
+	}
+
+	public Employee getEmployee(Long id) {
+		return (Employee) get(id);
+	}
+
+	public Employee setSkills(Employee employee, List<String> skillNames) {
+		if (employee != null && skillNames != null) {
+			employee.setOtherSkills(new ArrayList());
+			for (int i = 0, j = skillNames.size(); i < j; i++) {
+				Skill skill = (Skill) skillDao.get(skillNames.get(i));
+				employee.getOtherSkills().add(skill);
+			}
+		}
+		return employee;
+	}
+
+	public Employee setSkills(Long empId, List skillNames) {
+		return setSkills((Employee) get(empId), skillNames);
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/SkillDao.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/SkillDao.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/SkillDao.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/dao/SkillDao.java Fri Oct 19 18:49:39 2012
@@ -21,21 +21,22 @@
 package org.apache.struts2.showcase.dao;
 
 import org.apache.struts2.showcase.model.Skill;
+import org.springframework.stereotype.Repository;
 
 /**
  * SkillDao.
- *
  */
 
+@Repository
 public class SkillDao extends AbstractDao {
 
-    private static final long serialVersionUID = -8160406514074630866L;
+	private static final long serialVersionUID = -8160406514074630866L;
 
-    public Class getFeaturedClass() {
-        return Skill.class;
-    }
-
-    public Skill getSkill( String name ) {
-        return (Skill) get(name);
-    }
+	public Class getFeaturedClass() {
+		return Skill.class;
+	}
+
+	public Skill getSkill(String name) {
+		return (Skill) get(name);
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/CreateException.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/CreateException.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/CreateException.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/CreateException.java Fri Oct 19 18:49:39 2012
@@ -22,22 +22,21 @@ package org.apache.struts2.showcase.exce
 
 /**
  * CreateException.
- *
  */
 
 public class CreateException extends StorageException {
 
-    private static final long serialVersionUID = 6734349565111633783L;
+	private static final long serialVersionUID = 6734349565111633783L;
 
-    public CreateException(String message) {
-        super(message);
-    }
-
-    public CreateException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public CreateException(Throwable cause) {
-        super(cause);
-    }
+	public CreateException(String message) {
+		super(message);
+	}
+
+	public CreateException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public CreateException(Throwable cause) {
+		super(cause);
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DeleteException.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DeleteException.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DeleteException.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DeleteException.java Fri Oct 19 18:49:39 2012
@@ -22,23 +22,22 @@ package org.apache.struts2.showcase.exce
 
 /**
  * DeleteException.
- *
  */
 
 public class DeleteException extends StorageException {
 
-    private static final long serialVersionUID = -5286362812955627352L;
+	private static final long serialVersionUID = -5286362812955627352L;
 
-    public DeleteException(String message) {
-        super(message);
-    }
-
-    public DeleteException(Throwable cause) {
-        super(cause);
-    }
-
-    public DeleteException(String message, Throwable cause) {
-        super(message, cause);
-    }
+	public DeleteException(String message) {
+		super(message);
+	}
+
+	public DeleteException(Throwable cause) {
+		super(cause);
+	}
+
+	public DeleteException(String message, Throwable cause) {
+		super(message, cause);
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DuplicateKeyException.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DuplicateKeyException.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DuplicateKeyException.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/DuplicateKeyException.java Fri Oct 19 18:49:39 2012
@@ -22,23 +22,22 @@ package org.apache.struts2.showcase.exce
 
 /**
  * DuplicateKeyException.
- *
  */
 
 public class DuplicateKeyException extends CreateException {
 
-    private static final long serialVersionUID = 989620752592415898L;
+	private static final long serialVersionUID = 989620752592415898L;
 
-    public DuplicateKeyException(String message) {
-        super(message);
-    }
-
-    public DuplicateKeyException(Throwable cause) {
-        super(cause);
-    }
-
-    public DuplicateKeyException(String message, Throwable cause) {
-        super(message, cause);
-    }
+	public DuplicateKeyException(String message) {
+		super(message);
+	}
+
+	public DuplicateKeyException(Throwable cause) {
+		super(cause);
+	}
+
+	public DuplicateKeyException(String message, Throwable cause) {
+		super(message, cause);
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/StorageException.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/StorageException.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/StorageException.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/StorageException.java Fri Oct 19 18:49:39 2012
@@ -22,23 +22,22 @@ package org.apache.struts2.showcase.exce
 
 /**
  * StorageException.
- *
  */
 
 public class StorageException extends Exception {
 
-    private static final long serialVersionUID = -2528721270540362905L;
+	private static final long serialVersionUID = -2528721270540362905L;
 
-    public StorageException(String message) {
-        super(message);
-    }
-
-    public StorageException(Throwable cause) {
-        super(cause);
-    }
-
-    public StorageException(String message, Throwable cause) {
-        super(message, cause);
-    }
+	public StorageException(String message) {
+		super(message);
+	}
+
+	public StorageException(Throwable cause) {
+		super(cause);
+	}
+
+	public StorageException(String message, Throwable cause) {
+		super(message, cause);
+	}
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/UpdateException.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/UpdateException.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/UpdateException.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/exception/UpdateException.java Fri Oct 19 18:49:39 2012
@@ -23,23 +23,22 @@ package org.apache.struts2.showcase.exce
 
 /**
  * UpdateException.
- *
  */
 
 public class UpdateException extends StorageException {
 
-    private static final long serialVersionUID = -4728238600375630452L;
+	private static final long serialVersionUID = -4728238600375630452L;
 
 
-    public UpdateException(String message) {
-        super(message);
-    }
+	public UpdateException(String message) {
+		super(message);
+	}
 
-    public UpdateException(Throwable cause) {
-        super(cause);
-    }
+	public UpdateException(Throwable cause) {
+		super(cause);
+	}
 
-    public UpdateException(String message, Throwable cause) {
-        super(message, cause);
-    }
+	public UpdateException(String message, Throwable cause) {
+		super(message, cause);
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/filedownload/FileDownloadAction.java Fri Oct 19 18:49:39 2012
@@ -20,31 +20,29 @@
  */
 package org.apache.struts2.showcase.filedownload;
 
-import java.io.InputStream;
-
+import com.opensymphony.xwork2.Action;
 import org.apache.struts2.ServletActionContext;
 
-import com.opensymphony.xwork2.Action;
+import java.io.InputStream;
 
 /**
  * Demonstrates file resource download.
  * Set filePath to the local file resource to download,
  * relative to the application root ("/images/struts.gif").
- *
  */
 public class FileDownloadAction implements Action {
 
-    private String inputPath;
-    public void setInputPath(String value) {
-        inputPath = value;
-    }
-
-    public InputStream getInputStream() throws Exception {
-        return ServletActionContext.getServletContext().getResourceAsStream(inputPath);
-    }
-
-    public String execute() throws Exception {
-        return SUCCESS;
-    }
+	private String inputPath;
 
+	public String execute() throws Exception {
+		return SUCCESS;
+	}
+
+	public void setInputPath(String value) {
+		inputPath = value;
+	}
+
+	public InputStream getInputStream() throws Exception {
+		return ServletActionContext.getServletContext().getResourceAsStream(inputPath);
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/FileUploadAction.java Fri Oct 19 18:49:39 2012
@@ -20,66 +20,68 @@
  */
 package org.apache.struts2.showcase.fileupload;
 
-import java.io.File;
-
 import com.opensymphony.xwork2.ActionSupport;
 
+import java.io.File;
+
 /**
  * Show case File Upload example's action. <code>FileUploadAction</code>
- *
  */
 public class FileUploadAction extends ActionSupport {
 
-    private static final long serialVersionUID = 5156288255337069381L;
+	private static final long serialVersionUID = 5156288255337069381L;
+
+	private String contentType;
+	private File upload;
+	private String fileName;
+	private String caption;
+
+	public String input() throws Exception {
+		return SUCCESS;
+	}
+
+	public String upload() throws Exception {
+		return SUCCESS;
+	}
+
+	// since we are using <s:file name="upload" .../> the file name will be
+	// obtained through getter/setter of <file-tag-name>FileName
+	public String getUploadFileName() {
+		return fileName;
+	}
+
+	public void setUploadFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+
+	// since we are using <s:file name="upload" ... /> the content type will be
+	// obtained through getter/setter of <file-tag-name>ContentType
+	public String getUploadContentType() {
+		return contentType;
+	}
+
+	public void setUploadContentType(String contentType) {
+		this.contentType = contentType;
+	}
+
+
+	// since we are using <s:file name="upload" ... /> the File itself will be
+	// obtained through getter/setter of <file-tag-name>
+	public File getUpload() {
+		return upload;
+	}
+
+	public void setUpload(File upload) {
+		this.upload = upload;
+	}
+
 
-    private String contentType;
-    private File upload;
-    private String fileName;
-    private String caption;
-
-    // since we are using <s:file name="upload" .../> the file name will be
-    // obtained through getter/setter of <file-tag-name>FileName
-    public String getUploadFileName() {
-        return fileName;
-    }
-    public void setUploadFileName(String fileName) {
-        this.fileName = fileName;
-    }
-
-
-    // since we are using <s:file name="upload" ... /> the content type will be
-    // obtained through getter/setter of <file-tag-name>ContentType
-    public String getUploadContentType() {
-        return contentType;
-    }
-    public void setUploadContentType(String contentType) {
-        this.contentType = contentType;
-    }
-
-
-    // since we are using <s:file name="upload" ... /> the File itself will be
-    // obtained through getter/setter of <file-tag-name>
-    public File getUpload() {
-        return upload;
-    }
-    public void setUpload(File upload) {
-        this.upload = upload;
-    }
-
-
-    public String getCaption() {
-        return caption;
-    }
-    public void setCaption(String caption) {
-        this.caption = caption;
-    }
-
-    public String input() throws Exception {
-        return SUCCESS;
-    }
-
-    public String upload() throws Exception  {
-        return SUCCESS;
-    }
+	public String getCaption() {
+		return caption;
+	}
 
+	public void setCaption(String caption) {
+		this.caption = caption;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingArrayAction.java Fri Oct 19 18:49:39 2012
@@ -21,10 +21,10 @@
 // START SNIPPET: entire-file
 package org.apache.struts2.showcase.fileupload;
 
-import java.io.File;
-
 import com.opensymphony.xwork2.ActionSupport;
 
+import java.io.File;
+
 /**
  * Showcase action - mutiple file upload using array.
  *
@@ -32,35 +32,51 @@ import com.opensymphony.xwork2.ActionSup
  */
 public class MultipleFileUploadUsingArrayAction extends ActionSupport {
 
-    private File[] uploads;
-    private String[] uploadFileNames;
-    private String[] uploadContentTypes;
-
-    public File[] getUpload() { return this.uploads; }
-    public void setUpload(File[] upload) { this.uploads = upload; }
-
-    public String[] getUploadFileName() { return this.uploadFileNames; }
-    public void setUploadFileName(String[] uploadFileName) { this.uploadFileNames = uploadFileName; }
-
-    public String[] getUploadContentType() { return this.uploadContentTypes; }
-    public void setUploadContentType(String[] uploadContentType) { this.uploadContentTypes = uploadContentType; }
-
-    public String upload() throws Exception {
-        System.out.println("\n\n upload2");
-        System.out.println("files:");
-        for (File u: uploads) {
-            System.out.println("*** "+u+"\t"+u.length());
-        }
-        System.out.println("filenames:");
-        for (String n: uploadFileNames) {
-            System.out.println("*** "+n);
-        }
-        System.out.println("content types:");
-        for (String c: uploadContentTypes) {
-            System.out.println("*** "+c);
-        }
-        System.out.println("\n\n");
-        return SUCCESS;
-    }
+	private File[] uploads;
+	private String[] uploadFileNames;
+	private String[] uploadContentTypes;
+
+
+	public String upload() throws Exception {
+		System.out.println("\n\n upload2");
+		System.out.println("files:");
+		for (File u : uploads) {
+			System.out.println("*** " + u + "\t" + u.length());
+		}
+		System.out.println("filenames:");
+		for (String n : uploadFileNames) {
+			System.out.println("*** " + n);
+		}
+		System.out.println("content types:");
+		for (String c : uploadContentTypes) {
+			System.out.println("*** " + c);
+		}
+		System.out.println("\n\n");
+		return SUCCESS;
+	}
+
+	public File[] getUpload() {
+		return this.uploads;
+	}
+
+	public void setUpload(File[] upload) {
+		this.uploads = upload;
+	}
+
+	public String[] getUploadFileName() {
+		return this.uploadFileNames;
+	}
+
+	public void setUploadFileName(String[] uploadFileName) {
+		this.uploadFileNames = uploadFileName;
+	}
+
+	public String[] getUploadContentType() {
+		return this.uploadContentTypes;
+	}
+
+	public void setUploadContentType(String[] uploadContentType) {
+		this.uploadContentTypes = uploadContentType;
+	}
 }
 // END SNIPPET: entire-file
\ No newline at end of file

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/fileupload/MultipleFileUploadUsingListAction.java Fri Oct 19 18:49:39 2012
@@ -20,61 +20,66 @@
  */
 // START SNIPPET: entire-file
 package org.apache.struts2.showcase.fileupload;
+
+import com.opensymphony.xwork2.ActionSupport;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
-import com.opensymphony.xwork2.ActionSupport;
-
 /**
  * Showcase action - multiple file upload using List
+ *
  * @version $Date$ $Id$
  */
 public class MultipleFileUploadUsingListAction extends ActionSupport {
 
-    private List<File> uploads = new ArrayList<File>();
-    private List<String> uploadFileNames = new ArrayList<String>();
-    private List<String> uploadContentTypes = new ArrayList<String>();
-
-
-    public List<File> getUpload() {
-        return this.uploads;
-    }
-    public void setUpload(List<File> uploads) {
-        this.uploads = uploads;
-    }
-
-    public List<String> getUploadFileName() {
-        return this.uploadFileNames;
-    }
-    public void setUploadFileName(List<String> uploadFileNames) {
-        this.uploadFileNames = uploadFileNames;
-    }
-
-    public List<String> getUploadContentType() {
-        return this.uploadContentTypes;
-    }
-    public void setUploadContentType(List<String> contentTypes) {
-        this.uploadContentTypes = contentTypes;
-    }
-
-    public String upload() throws Exception {
-
-        System.out.println("\n\n upload1");
-        System.out.println("files:");
-        for (File u: uploads) {
-            System.out.println("*** "+u+"\t"+u.length());
-        }
-        System.out.println("filenames:");
-        for (String n: uploadFileNames) {
-            System.out.println("*** "+n);
-        }
-        System.out.println("content types:");
-        for (String c: uploadContentTypes) {
-            System.out.println("*** "+c);
-        }
-        System.out.println("\n\n");
-        return SUCCESS;
-    }
+	private List<File> uploads = new ArrayList<File>();
+	private List<String> uploadFileNames = new ArrayList<String>();
+	private List<String> uploadContentTypes = new ArrayList<String>();
+
+
+	public List<File> getUpload() {
+		return this.uploads;
+	}
+
+	public void setUpload(List<File> uploads) {
+		this.uploads = uploads;
+	}
+
+	public List<String> getUploadFileName() {
+		return this.uploadFileNames;
+	}
+
+	public void setUploadFileName(List<String> uploadFileNames) {
+		this.uploadFileNames = uploadFileNames;
+	}
+
+	public List<String> getUploadContentType() {
+		return this.uploadContentTypes;
+	}
+
+	public void setUploadContentType(List<String> contentTypes) {
+		this.uploadContentTypes = contentTypes;
+	}
+
+	public String upload() throws Exception {
+
+		System.out.println("\n\n upload1");
+		System.out.println("files:");
+		for (File u : uploads) {
+			System.out.println("*** " + u + "\t" + u.length());
+		}
+		System.out.println("filenames:");
+		for (String n : uploadFileNames) {
+			System.out.println("*** " + n);
+		}
+		System.out.println("content types:");
+		for (String c : uploadContentTypes) {
+			System.out.println("*** " + c);
+		}
+		System.out.println("\n\n");
+		return SUCCESS;
+	}
 }
 // END SNIPPET: entire-file
\ No newline at end of file

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManager.java Fri Oct 19 18:49:39 2012
@@ -20,39 +20,37 @@
  */
 package org.apache.struts2.showcase.freemarker;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.opensymphony.xwork2.util.ValueStack;
 import org.apache.struts2.views.freemarker.FreemarkerManager;
 import org.apache.struts2.views.freemarker.ScopesHashModel;
 
-import com.opensymphony.xwork2.ognl.OgnlValueStack;
-import com.opensymphony.xwork2.util.ValueStack;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 /**
  * This is an example of a custom FreemarkerManager, mean to be
  * instantiated through Spring.
  * <p/>
- *
+ * <p/>
  * It will add into Freemarker's model
  * an utility class called {@link CustomFreemarkerManagerUtil} as a simple
  * example demonstrating how to extends FreemarkerManager.
  * <p/>
- *
+ * <p/>
  * The {@link CustomFreemarkerManagerUtil} will be created by Spring and
  * injected through constructor injection.
  * <p/>
  */
 public class CustomFreemarkerManager extends FreemarkerManager {
 
-    private CustomFreemarkerManagerUtil util;
+	private CustomFreemarkerManagerUtil util;
 
-    public CustomFreemarkerManager(CustomFreemarkerManagerUtil util) {
-        this.util = util;
-    }
-
-    protected void populateContext(ScopesHashModel model, ValueStack stack, Object action, HttpServletRequest request, HttpServletResponse response) {
-        super.populateContext(model, stack, action, request, response);
-        model.put("customFreemarkerManagerUtil", util);
-    }
+	public CustomFreemarkerManager(CustomFreemarkerManagerUtil util) {
+		this.util = util;
+	}
+
+	protected void populateContext(ScopesHashModel model, ValueStack stack, Object action, HttpServletRequest request, HttpServletResponse response) {
+		super.populateContext(model, stack, action, request, response);
+		model.put("customFreemarkerManagerUtil", util);
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManagerUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManagerUtil.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManagerUtil.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/CustomFreemarkerManagerUtil.java Fri Oct 19 18:49:39 2012
@@ -30,13 +30,13 @@ import java.util.Date;
  */
 public class CustomFreemarkerManagerUtil {
 
-    public String getTodayDate() {
-        SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
-        return sdf.format(new Date());
-    }
+	public String getTodayDate() {
+		SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
+		return sdf.format(new Date());
+	}
 
-    public String getTimeNow() {
-        SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss");
-        return sdf.format(new Date());
-    }
+	public String getTimeNow() {
+		SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss");
+		return sdf.format(new Date());
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/freemarker/StandardTagsAction.java Fri Oct 19 18:49:39 2012
@@ -30,38 +30,38 @@ import java.text.DateFormatSymbols;
  */
 public class StandardTagsAction extends ActionSupport implements Preparable {
 
-    private String name;
-    private String[] gender;
-    private String[] months;
-
-    public void prepare() {
-        months = new DateFormatSymbols().getMonths();
-        name = StandardTagsAction.class.getName().substring(StandardTagsAction.class.getName().lastIndexOf(".")+1);
-        gender = new String[] { "Male", "Femal" };
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String[] getMonths() {
-        return months;
-    }
-
-    public void setMonths(String[] months) {
-        this.months = months;
-    }
-
-
-    public String[] getGender() {
-        return gender;
-    }
-
-    public void setGender(String[] gender) {
-        this.gender = gender;
-    }
+	private String name;
+	private String[] gender;
+	private String[] months;
+
+	public void prepare() {
+		months = new DateFormatSymbols().getMonths();
+		name = StandardTagsAction.class.getName().substring(StandardTagsAction.class.getName().lastIndexOf(".") + 1);
+		gender = new String[]{"Male", "Femal"};
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String[] getMonths() {
+		return months;
+	}
+
+	public void setMonths(String[] months) {
+		this.months = months;
+	}
+
+
+	public String[] getGender() {
+		return gender;
+	}
+
+	public void setGender(String[] gender) {
+		this.gender = gender;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GetUpdatedHangmanAction.java Fri Oct 19 18:49:39 2012
@@ -20,40 +20,40 @@
  */
 package org.apache.struts2.showcase.hangman;
 
-import java.util.Map;
-
+import com.opensymphony.xwork2.ActionSupport;
 import org.apache.struts2.interceptor.SessionAware;
 
-import com.opensymphony.xwork2.ActionSupport;
+import java.util.Map;
 
 public class GetUpdatedHangmanAction extends ActionSupport implements SessionAware {
 
-    private static final long serialVersionUID = 5506025785406043027L;
+	private static final long serialVersionUID = 5506025785406043027L;
+
+	private Map session;
+	private Hangman hangman;
+
+
+	public String execute() throws Exception {
+		hangman = (Hangman) session.get(HangmanConstants.HANGMAN_SESSION_KEY);
+
+		System.out.println("\n\n\n");
+		System.out.println("hangman=" + hangman);
+		System.out.println("available = " + hangman.getCharactersAvailable().size());
+		System.out.println("guess left=" + hangman.guessLeft());
+		System.out.println("\n\n\n");
 
-    private Map session;
-    private Hangman hangman;
+		return SUCCESS;
+	}
 
+	public void setSession(Map session) {
+		this.session = session;
+	}
 
-    public String execute() throws Exception {
-        hangman = (Hangman) session.get(HangmanConstants.HANGMAN_SESSION_KEY);
+	public Hangman getHangman() {
+		return hangman;
+	}
 
-        System.out.println("\n\n\n");
-        System.out.println("hangman="+hangman);
-        System.out.println("available = "+hangman.getCharactersAvailable().size());
-        System.out.println("guess left="+hangman.guessLeft());
-        System.out.println("\n\n\n");
-
-        return SUCCESS;
-    }
-
-    public void setSession(Map session) {
-        this.session = session;
-    }
-
-    public Hangman getHangman() {
-        return hangman;
-    }
-    public void setHangman(Hangman hangman) {
-        this.hangman = hangman;
-    }
+	public void setHangman(Hangman hangman) {
+		this.hangman = hangman;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/GuessCharacterAction.java Fri Oct 19 18:49:39 2012
@@ -20,40 +20,39 @@
  */
 package org.apache.struts2.showcase.hangman;
 
-import java.util.Map;
-
+import com.opensymphony.xwork2.ActionSupport;
 import org.apache.struts2.interceptor.SessionAware;
 
-import com.opensymphony.xwork2.ActionSupport;
+import java.util.Map;
 
 public class GuessCharacterAction extends ActionSupport implements SessionAware {
 
-    private static final long serialVersionUID = 9050915577007590674L;
+	private static final long serialVersionUID = 9050915577007590674L;
 
-    private Map session;
-    private Character character;
-    private Hangman hangman;
-
-    public String execute() throws Exception {
-        hangman = (Hangman) session.get(HangmanConstants.HANGMAN_SESSION_KEY);
-        hangman.guess(character);
-
-        return SUCCESS;
-    }
-
-    public Hangman getHangman() {
-        return hangman;
-    }
-
-    public void setSession(Map session) {
-        this.session = session;
-    }
-
-    public void setCharacter(Character character) {
-        this.character = character;
-    }
-
-    public Character getCharacter() {
-        return this.character;
-    }
+	private Map session;
+	private Character character;
+	private Hangman hangman;
+
+	public String execute() throws Exception {
+		hangman = (Hangman) session.get(HangmanConstants.HANGMAN_SESSION_KEY);
+		hangman.guess(character);
+
+		return SUCCESS;
+	}
+
+	public Hangman getHangman() {
+		return hangman;
+	}
+
+	public void setSession(Map session) {
+		this.session = session;
+	}
+
+	public void setCharacter(Character character) {
+		this.character = character;
+	}
+
+	public Character getCharacter() {
+		return this.character;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Hangman.java Fri Oct 19 18:49:39 2012
@@ -27,83 +27,83 @@ import java.util.List;
 
 public class Hangman implements Serializable {
 
-    private static final long serialVersionUID = 8566954355839652509L;
+	private static final long serialVersionUID = 8566954355839652509L;
 
-    private Vocab vocab;
+	private Vocab vocab;
 
-    private Boolean win = false;
+	private Boolean win = false;
 
-    private int guessLeft = 5;
-    public List<Character> charactersAvailable;
-    public List<Character> charactersGuessed;
-
-    public Hangman(Vocab vocab) {
-        // Arrays.asList(...) returns List that doesn't support remove(), hence
-        // we wrap it with an ArrayList to avoid UnsupportedOperationException
-        // when doing a remove()
-        charactersAvailable = new ArrayList<Character>(Arrays.asList(
-            new Character[] {
-                Character.valueOf('A'), Character.valueOf('B'), Character.valueOf('C'),
-                Character.valueOf('D'), Character.valueOf('E'), Character.valueOf('F'),
-                Character.valueOf('G'), Character.valueOf('H'), Character.valueOf('I'),
-                Character.valueOf('J'), Character.valueOf('K'), Character.valueOf('L'),
-                Character.valueOf('M'), Character.valueOf('N'), Character.valueOf('O'),
-                Character.valueOf('P'), Character.valueOf('Q'), Character.valueOf('R'),
-                Character.valueOf('S'), Character.valueOf('T'), Character.valueOf('U'),
-                Character.valueOf('V'), Character.valueOf('W'), Character.valueOf('X'),
-                Character.valueOf('Y'), Character.valueOf('Z')
-            }));
-        charactersGuessed = new ArrayList<Character>();
-        this.vocab = vocab;
-    }
-
-    public void guess(Character character) {
-        assert(character != null);
-
-        synchronized(charactersAvailable) {
-            if (guessLeft < 0) {
-                throw new HangmanException(
-                    HangmanException.Type.valueOf("GAME_ENDED"), "Game already eneded");
-            }
-            Character characterInUpperCase = Character.toUpperCase(character);
-            boolean ok = charactersAvailable.remove(characterInUpperCase);
-            if (ok) {
-                charactersGuessed.add(characterInUpperCase);
-                if (! vocab.containCharacter(characterInUpperCase)) {
-                    guessLeft = guessLeft - 1;
-                }
-            }
-            if (vocab.containsAllCharacter(charactersGuessed)) {
-                win = true;
-            }
-            System.out.println(" *********************************** "+win);
-        }
-    }
-
-    public Boolean isWin() {
-        return this.win;
-    }
-
-    public Vocab getVocab() {
-        return vocab;
-    }
-
-    public Boolean gameEnded() {
-        return ((guessLeft < 0) || win);
-    }
-
-    public Integer guessLeft() {
-        return guessLeft;
-    }
-
-    public List<Character> getCharactersAvailable() {
-        synchronized(charactersAvailable) {
-             return new ArrayList<Character>(charactersAvailable);
-            //return charactersAvailable;
-        }
-    }
-
-    public boolean characterGuessedBefore(Character character) {
-        return charactersGuessed.contains(character);
-    }
+	private int guessLeft = 5;
+	public List<Character> charactersAvailable;
+	public List<Character> charactersGuessed;
+
+	public Hangman(Vocab vocab) {
+		// Arrays.asList(...) returns List that doesn't support remove(), hence
+		// we wrap it with an ArrayList to avoid UnsupportedOperationException
+		// when doing a remove()
+		charactersAvailable = new ArrayList<Character>(Arrays.asList(
+				new Character[]{
+						Character.valueOf('A'), Character.valueOf('B'), Character.valueOf('C'),
+						Character.valueOf('D'), Character.valueOf('E'), Character.valueOf('F'),
+						Character.valueOf('G'), Character.valueOf('H'), Character.valueOf('I'),
+						Character.valueOf('J'), Character.valueOf('K'), Character.valueOf('L'),
+						Character.valueOf('M'), Character.valueOf('N'), Character.valueOf('O'),
+						Character.valueOf('P'), Character.valueOf('Q'), Character.valueOf('R'),
+						Character.valueOf('S'), Character.valueOf('T'), Character.valueOf('U'),
+						Character.valueOf('V'), Character.valueOf('W'), Character.valueOf('X'),
+						Character.valueOf('Y'), Character.valueOf('Z')
+				}));
+		charactersGuessed = new ArrayList<Character>();
+		this.vocab = vocab;
+	}
+
+	public void guess(Character character) {
+		assert (character != null);
+
+		synchronized (charactersAvailable) {
+			if (guessLeft < 0) {
+				throw new HangmanException(
+						HangmanException.Type.valueOf("GAME_ENDED"), "Game already eneded");
+			}
+			Character characterInUpperCase = Character.toUpperCase(character);
+			boolean ok = charactersAvailable.remove(characterInUpperCase);
+			if (ok) {
+				charactersGuessed.add(characterInUpperCase);
+				if (!vocab.containCharacter(characterInUpperCase)) {
+					guessLeft = guessLeft - 1;
+				}
+			}
+			if (vocab.containsAllCharacter(charactersGuessed)) {
+				win = true;
+			}
+			System.out.println(" *********************************** " + win);
+		}
+	}
+
+	public Boolean isWin() {
+		return this.win;
+	}
+
+	public Vocab getVocab() {
+		return vocab;
+	}
+
+	public Boolean gameEnded() {
+		return ((guessLeft < 0) || win);
+	}
+
+	public Integer guessLeft() {
+		return guessLeft;
+	}
+
+	public List<Character> getCharactersAvailable() {
+		synchronized (charactersAvailable) {
+			return new ArrayList<Character>(charactersAvailable);
+			//return charactersAvailable;
+		}
+	}
+
+	public boolean characterGuessedBefore(Character character) {
+		return charactersGuessed.contains(character);
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanConstants.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanConstants.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanConstants.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanConstants.java Fri Oct 19 18:49:39 2012
@@ -21,6 +21,6 @@
 package org.apache.struts2.showcase.hangman;
 
 public class HangmanConstants {
-    // keeps a Hangman object in HttpSession
-    public static final String HANGMAN_SESSION_KEY = "Hangman_Session_Key";
+	// keeps a Hangman object in HttpSession
+	public static final String HANGMAN_SESSION_KEY = "Hangman_Session_Key";
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanException.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanException.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanException.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanException.java Fri Oct 19 18:49:39 2012
@@ -22,23 +22,23 @@ package org.apache.struts2.showcase.hang
 
 public class HangmanException extends RuntimeException {
 
-    private static final long serialVersionUID = -8500292863595941335L;
+	private static final long serialVersionUID = -8500292863595941335L;
 
-    enum Type {
-        GAME_ENDED,
-        NO_VOCAB,
-        NO_VOCAB_SOURCE;
-    }
+	enum Type {
+		GAME_ENDED,
+		NO_VOCAB,
+		NO_VOCAB_SOURCE;
+	}
 
 
-    private Type type;
+	private Type type;
 
-    public HangmanException (Type type, String reason) {
-        super(reason);
-        this.type = type;
-    }
+	public HangmanException(Type type, String reason) {
+		super(reason);
+		this.type = type;
+	}
 
-    public Type getType() {
-        return type;
-    }
+	public Type getType() {
+		return type;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanService.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanService.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanService.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/HangmanService.java Fri Oct 19 18:49:39 2012
@@ -22,13 +22,13 @@ package org.apache.struts2.showcase.hang
 
 public class HangmanService {
 
-    public VocabSource vocabSource;
+	public VocabSource vocabSource;
 
-    public HangmanService(VocabSource vocabSource) {
-        this.vocabSource = vocabSource;
-    }
+	public HangmanService(VocabSource vocabSource) {
+		this.vocabSource = vocabSource;
+	}
 
-    public Hangman startNewGame() {
-        return new Hangman(vocabSource.getRandomVocab());
-    }
+	public Hangman startNewGame() {
+		return new Hangman(vocabSource.getRandomVocab());
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/PropertiesVocabSource.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/PropertiesVocabSource.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/PropertiesVocabSource.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/PropertiesVocabSource.java Fri Oct 19 18:49:39 2012
@@ -27,45 +27,45 @@ import java.util.Properties;
 
 public class PropertiesVocabSource implements VocabSource {
 
-    private Properties prop;
-    private List<Vocab> vocabs;
+	private Properties prop;
+	private List<Vocab> vocabs;
 
-    public PropertiesVocabSource() {
-    }
+	public PropertiesVocabSource() {
+	}
 
-    public PropertiesVocabSource(Properties prop) {
-        assert(prop != null);
-        this.prop = prop;
-        vocabs = readVocab(prop);
-    }
-
-    public void setVocabProperties(Properties prop) {
-        assert(prop != null);
-        this.prop = prop;
-        vocabs = readVocab(prop);
-    }
-
-    public Vocab getRandomVocab() {
-        if (vocabs == null) {
-            throw new HangmanException(HangmanException.Type.valueOf("NO_VOCAB_SOURCE"), "No vocab source");
-        }
-        if (vocabs.size() <= 0) {
-            throw new HangmanException(HangmanException.Type.valueOf("NO_VOCAB"), "No vocab");
-        }
-        long vocabIndex = Math.round((Math.random() * (double)prop.size()));
-        vocabIndex = vocabIndex == vocabs.size() ? vocabs.size() - 1 : vocabIndex;
-        return vocabs.get((int)vocabIndex);
-    }
-
-    protected List<Vocab> readVocab(Properties prop) {
-        List<Vocab> vocabList = new ArrayList<Vocab>();
-
-        for (Map.Entry e : prop.entrySet()) {
-            String vocab = (String) e.getKey();
-            String hint = (String) e.getValue();
-
-            vocabList.add(new Vocab(vocab, hint));
-        }
-        return vocabList;
-    }
+	public PropertiesVocabSource(Properties prop) {
+		assert (prop != null);
+		this.prop = prop;
+		vocabs = readVocab(prop);
+	}
+
+	public void setVocabProperties(Properties prop) {
+		assert (prop != null);
+		this.prop = prop;
+		vocabs = readVocab(prop);
+	}
+
+	public Vocab getRandomVocab() {
+		if (vocabs == null) {
+			throw new HangmanException(HangmanException.Type.valueOf("NO_VOCAB_SOURCE"), "No vocab source");
+		}
+		if (vocabs.size() <= 0) {
+			throw new HangmanException(HangmanException.Type.valueOf("NO_VOCAB"), "No vocab");
+		}
+		long vocabIndex = Math.round((Math.random() * (double) prop.size()));
+		vocabIndex = vocabIndex == vocabs.size() ? vocabs.size() - 1 : vocabIndex;
+		return vocabs.get((int) vocabIndex);
+	}
+
+	protected List<Vocab> readVocab(Properties prop) {
+		List<Vocab> vocabList = new ArrayList<Vocab>();
+
+		for (Map.Entry e : prop.entrySet()) {
+			String vocab = (String) e.getKey();
+			String hint = (String) e.getValue();
+
+			vocabList.add(new Vocab(vocab, hint));
+		}
+		return vocabList;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/StartHangmanAction.java Fri Oct 19 18:49:39 2012
@@ -20,42 +20,41 @@
  */
 package org.apache.struts2.showcase.hangman;
 
-import static org.apache.struts2.showcase.hangman.HangmanConstants.HANGMAN_SESSION_KEY;
+import com.opensymphony.xwork2.ActionSupport;
+import org.apache.struts2.interceptor.SessionAware;
 
 import java.util.Map;
 
-import org.apache.struts2.interceptor.SessionAware;
-
-import com.opensymphony.xwork2.ActionSupport;
+import static org.apache.struts2.showcase.hangman.HangmanConstants.HANGMAN_SESSION_KEY;
 
 public class StartHangmanAction extends ActionSupport implements SessionAware {
 
-    private static final long serialVersionUID = 2333463075324892521L;
+	private static final long serialVersionUID = 2333463075324892521L;
 
-    private HangmanService service;
-    private Hangman hangman;
-    private Map session;
+	private HangmanService service;
+	private Hangman hangman;
+	private Map session;
 
 
-    public StartHangmanAction(HangmanService service) {
-        this.service = service;
-    }
+	public StartHangmanAction(HangmanService service) {
+		this.service = service;
+	}
 
-    public String execute() throws Exception {
+	public String execute() throws Exception {
 
-        hangman = service.startNewGame();
-        session.put(HANGMAN_SESSION_KEY, hangman);
+		hangman = service.startNewGame();
+		session.put(HANGMAN_SESSION_KEY, hangman);
 
-        return SUCCESS;
-    }
+		return SUCCESS;
+	}
 
-    public Hangman getHangman() {
-        return hangman;
-    }
+	public Hangman getHangman() {
+		return hangman;
+	}
 
 
-    // === SessionAware ===
-    public void setSession(Map session) {
-        this.session = session;
-    }
+	// === SessionAware ===
+	public void setSession(Map session) {
+		this.session = session;
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Vocab.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Vocab.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Vocab.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/Vocab.java Fri Oct 19 18:49:39 2012
@@ -27,60 +27,65 @@ import java.util.List;
 
 public class Vocab implements Serializable {
 
-    private static final long serialVersionUID = 1L;
+	private static final long serialVersionUID = 1L;
 
-    private String vocab;
-    private String hint;
-    private Character[] characters; // character this vocab is made up of
-
-    public Vocab(String vocab, String hint) {
-        assert(vocab != null);
-        assert(hint != null);
-
-        this.vocab = vocab.toUpperCase();
-        this.hint = hint;
-    }
-
-    public String getVocab() { return this.vocab; }
-    public String getHint() { return this.hint; }
-
-    public Boolean containCharacter(Character character) {
-        assert(character != null);
-
-        return (vocab.contains(character.toString())) ? true : false;
-    }
-
-    public Character[] inCharacters() {
-        if (characters == null) {
-            char[] c = vocab.toCharArray();
-            characters = new Character[c.length];
-            for (int a=0; a< c.length; a++) {
-                characters[a] = Character.valueOf(c[a]);
-            }
-        }
-        return characters;
-    }
-
-    public boolean containsAllCharacter(List<Character> charactersGuessed) {
-        Character[] chars = inCharacters();
-        List<Character> tmpChars = Arrays.asList(chars);
-        return charactersGuessed.containsAll(tmpChars);
-    }
-
-    public static void main(String args[]) throws Exception {
-        Vocab v = new Vocab("JAVA", "a java word");
-
-        List<Character> list1= new ArrayList<Character>();
-        list1.add(new Character('J'));
-        list1.add(new Character('V'));
-
-        List<Character> list2 = new ArrayList<Character>();
-        list2.add(new Character('J'));
-        list2.add(new Character('V'));
-        list2.add(new Character('A'));
+	private String vocab;
+	private String hint;
+	private Character[] characters; // character this vocab is made up of
+
+	public Vocab(String vocab, String hint) {
+		assert (vocab != null);
+		assert (hint != null);
+
+		this.vocab = vocab.toUpperCase();
+		this.hint = hint;
+	}
+
+	public String getVocab() {
+		return this.vocab;
+	}
+
+	public String getHint() {
+		return this.hint;
+	}
+
+	public Boolean containCharacter(Character character) {
+		assert (character != null);
+
+		return (vocab.contains(character.toString())) ? true : false;
+	}
+
+	public Character[] inCharacters() {
+		if (characters == null) {
+			char[] c = vocab.toCharArray();
+			characters = new Character[c.length];
+			for (int a = 0; a < c.length; a++) {
+				characters[a] = Character.valueOf(c[a]);
+			}
+		}
+		return characters;
+	}
+
+	public boolean containsAllCharacter(List<Character> charactersGuessed) {
+		Character[] chars = inCharacters();
+		List<Character> tmpChars = Arrays.asList(chars);
+		return charactersGuessed.containsAll(tmpChars);
+	}
+
+	public static void main(String args[]) throws Exception {
+		Vocab v = new Vocab("JAVA", "a java word");
+
+		List<Character> list1 = new ArrayList<Character>();
+		list1.add(new Character('J'));
+		list1.add(new Character('V'));
+
+		List<Character> list2 = new ArrayList<Character>();
+		list2.add(new Character('J'));
+		list2.add(new Character('V'));
+		list2.add(new Character('A'));
 
-        System.out.println(v.containsAllCharacter(list1));
-        System.out.println(v.containsAllCharacter(list2));
+		System.out.println(v.containsAllCharacter(list1));
+		System.out.println(v.containsAllCharacter(list2));
 
-    }
+	}
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/VocabSource.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/VocabSource.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/VocabSource.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/hangman/VocabSource.java Fri Oct 19 18:49:39 2012
@@ -21,5 +21,5 @@
 package org.apache.struts2.showcase.hangman;
 
 public interface VocabSource {
-    Vocab getRandomVocab();
+	Vocab getRandomVocab();
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/EditGangsterAction.java Fri Oct 19 18:49:39 2012
@@ -20,25 +20,25 @@
  */
 package org.apache.struts2.showcase.integration;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 public class EditGangsterAction extends Action {
 
-    /* (non-Javadoc)
-     * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    @Override
-    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        // Some code to load the gangster from the db as necessary
+	/* (non-Javadoc)
+		 * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+		 */
+	@Override
+	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		// Some code to load the gangster from the db as necessary
 
-        return mapping.findForward("success");
-    }
+		return mapping.findForward("success");
+	}
 
 
 }

Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java?rev=1400220&r1=1400219&r2=1400220&view=diff
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/integration/GangsterForm.java Fri Oct 19 18:49:39 2012
@@ -20,89 +20,96 @@
  */
 package org.apache.struts2.showcase.integration;
 
-import javax.servlet.http.HttpServletRequest;
-
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionMessage;
 import org.apache.struts.validator.ValidatorForm;
 
+import javax.servlet.http.HttpServletRequest;
+
 public class GangsterForm extends ValidatorForm {
 
-    private String name;
-    private String age;
-    private String description;
-    private boolean bustedBefore;
-
-    /* (non-Javadoc)
-     * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
-     */
-    @Override
-    public void reset(ActionMapping arg0, HttpServletRequest arg1) {
-        bustedBefore = false;
-    }
-
-    /* (non-Javadoc)
-     * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
-     */
-    @Override
-    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
-        ActionErrors errors = super.validate(mapping, request);
-        if (name == null || name.length() == 0) {
-            errors.add("name", new ActionMessage("The name must not be blank"));
-        }
-
-        return errors;
-    }
-
-    /**
-     * @return the age
-     */
-    public String getAge() {
-        return age;
-    }
-    /**
-     * @param age the age to set
-     */
-    public void setAge(String age) {
-        this.age = age;
-    }
-    /**
-     * @return the bustedBefore
-     */
-    public boolean isBustedBefore() {
-        return bustedBefore;
-    }
-    /**
-     * @param bustedBefore the bustedBefore to set
-     */
-    public void setBustedBefore(boolean bustedBefore) {
-        this.bustedBefore = bustedBefore;
-    }
-    /**
-     * @return the description
-     */
-    public String getDescription() {
-        return description;
-    }
-    /**
-     * @param description the description to set
-     */
-    public void setDescription(String description) {
-        this.description = description;
-    }
-    /**
-     * @return the name
-     */
-    public String getName() {
-        return name;
-    }
-    /**
-     * @param name the name to set
-     */
-    public void setName(String name) {
-        this.name = name;
-    }
+	private String name;
+	private String age;
+	private String description;
+	private boolean bustedBefore;
+
+	/* (non-Javadoc)
+		 * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
+		 */
+	@Override
+	public void reset(ActionMapping arg0, HttpServletRequest arg1) {
+		bustedBefore = false;
+	}
+
+	/* (non-Javadoc)
+		 * @see org.apache.struts.action.ActionForm#validate(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
+		 */
+	@Override
+	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
+		ActionErrors errors = super.validate(mapping, request);
+		if (name == null || name.length() == 0) {
+			errors.add("name", new ActionMessage("The name must not be blank"));
+		}
+
+		return errors;
+	}
+
+	/**
+	 * @return the age
+	 */
+	public String getAge() {
+		return age;
+	}
+
+	/**
+	 * @param age the age to set
+	 */
+	public void setAge(String age) {
+		this.age = age;
+	}
+
+	/**
+	 * @return the bustedBefore
+	 */
+	public boolean isBustedBefore() {
+		return bustedBefore;
+	}
+
+	/**
+	 * @param bustedBefore the bustedBefore to set
+	 */
+	public void setBustedBefore(boolean bustedBefore) {
+		this.bustedBefore = bustedBefore;
+	}
+
+	/**
+	 * @return the description
+	 */
+	public String getDescription() {
+		return description;
+	}
+
+	/**
+	 * @param description the description to set
+	 */
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * @param name the name to set
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
 
 
 }



Mime
View raw message