You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by hu...@apache.org on 2006/11/06 16:02:22 UTC
svn commit: r471756 [4/31] - in /struts/struts2/trunk: apps/blank/
apps/blank/src/main/java/example/ apps/blank/src/test/java/example/
apps/mailreader/src/main/java/mailreader2/
apps/portlet/src/main/java/org/apache/struts2/portlet/example/ apps/portle...
Modified: struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java (original)
+++ struts/struts2/trunk/apps/showcase/src/main/java/org/apache/struts2/showcase/chat/RoomsAvailableAction.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.chat;
@@ -24,22 +27,22 @@
public class RoomsAvailableAction extends ActionSupport {
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = 1L;
+
+ private List<Room> availableRooms = new ArrayList<Room>();
+
+ private ChatService chatService;
+
+ public RoomsAvailableAction(ChatService chatService) {
+ this.chatService = chatService;
+ }
+
+ public String execute() throws Exception {
+ availableRooms = chatService.getAvailableRooms();
+ return SUCCESS;
+ }
- private List<Room> availableRooms = new ArrayList<Room>();
-
- private ChatService chatService;
-
- public RoomsAvailableAction(ChatService chatService) {
- this.chatService = chatService;
- }
-
- public String execute() throws Exception {
- availableRooms = chatService.getAvailableRooms();
- return SUCCESS;
- }
-
- public List<Room> getAvailableRooms() {
- return availableRooms;
- }
+ public List<Room> getAvailableRooms() {
+ return availableRooms;
+ }
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.chat;
@@ -25,43 +28,43 @@
public class SendMessageToRoomAction extends ActionSupport implements SessionAware {
- 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;
- }
-
-
- 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;
- }
+ 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;
+ }
+
+
+ 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;
+ }
+
-
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.chat;
@@ -24,22 +27,22 @@
* Represends a user in the Chat example.
*/
public class User implements Serializable {
-
- private static final long serialVersionUID = -1434958919516089297L;
-
- private String name;
- private Date creationDate;
-
-
- public User(String name) {
- this.name = name;
- this.creationDate = new Date(System.currentTimeMillis());
- }
-
- public Date getCreationDate() {
- return creationDate;
- }
- public String getName() {
- return name;
- }
+
+ private static final long serialVersionUID = -1434958919516089297L;
+
+ private String name;
+ private Date creationDate;
+
+
+ public User(String name) {
+ this.name = name;
+ this.creationDate = new Date(System.currentTimeMillis());
+ }
+
+ 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.chat;
@@ -24,23 +27,23 @@
public class UsersAvailableAction extends ActionSupport {
- private static final long serialVersionUID = 1L;
-
- private List<User> availableUsers = new ArrayList<User>();
- private ChatService chatService;
-
- public UsersAvailableAction(ChatService chatService) {
- this.chatService = chatService;
- }
-
- public String execute() throws Exception {
-
- availableUsers = chatService.getAvailableUsers();
-
- return SUCCESS;
- }
-
- public List<User> getAvailableUsers() {
- return availableUsers;
- }
+ private static final long serialVersionUID = 1L;
+
+ private List<User> availableUsers = new ArrayList<User>();
+ private ChatService chatService;
+
+ public UsersAvailableAction(ChatService chatService) {
+ this.chatService = chatService;
+ }
+
+ public String execute() throws Exception {
+
+ availableUsers = chatService.getAvailableUsers();
+
+ return SUCCESS;
+ }
+
+ 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.chat;
@@ -24,35 +27,35 @@
public class UsersAvailableInRoomAction extends ActionSupport {
- private static final long serialVersionUID = 1L;
-
- private ChatService chatService;
- private List<User> usersAvailableInRoom = new ArrayList<User>();
-
- 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;
- }
+ private static final long serialVersionUID = 1L;
+
+ private ChatService chatService;
+ private List<User> usersAvailableInRoom = new ArrayList<User>();
+
+ 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;
+ }
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.conversion;
@@ -22,14 +25,14 @@
* @version $Date$ $Id$
*/
public class Address {
-
- private String id;
- private String address;
-
- public String getId() { return id; }
- public void setId(String id) { this.id = id; }
-
- public String getAddress() { return address; }
- public void setAddress(String address) { this.address = address; }
-
+
+ private String id;
+ private String address;
+
+ public String getId() { return id; }
+ 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.conversion;
@@ -27,18 +30,18 @@
*/
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;
- }
-
- public String submit() throws Exception {
- System.out.println(addresses);
- return SUCCESS;
- }
+ 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;
+ }
+
+ public String submit() throws Exception {
+ System.out.println(addresses);
+ return SUCCESS;
+ }
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.conversion;
@@ -29,27 +32,27 @@
*/
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,30 +1,33 @@
/*
- * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: Person.java 440597 2006-09-06 03:34:39Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.conversion;
@@ -24,30 +27,30 @@
import com.opensymphony.xwork2.ActionSupport;
/**
- *
+ *
* @version $Date$ $Id$
*/
public class OperationsEnumAction extends ActionSupport {
- private static final long serialVersionUID = -2229489704988870318L;
-
- 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;
- }
+ private static final long serialVersionUID = -2229489704988870318L;
+
+ 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;
+ }
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.conversion;
@@ -23,12 +26,12 @@
*
*/
public class Person implements Serializable {
- private String name;
- private Integer age;
-
- public void setName(String name) { this.name = name; }
- public String getName() { return this.name; }
-
- public void setAge(Integer age) { this.age = age; }
- public Integer getAge() { return this.age; }
+ private String name;
+ private Integer age;
+
+ public void setName(String name) { this.name = name; }
+ 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.conversion;
@@ -22,22 +25,22 @@
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; }
-
-
-
- public String input() throws Exception {
- return SUCCESS;
- }
-
- public String submit() throws Exception {
- return SUCCESS;
- }
+
+ private List persons;
+
+ public List getPersons() { return persons; }
+ public void setPersons(List persons) { this.persons = persons; }
+
+
+
+ public String input() throws Exception {
+ return SUCCESS;
+ }
+
+ 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.dao;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.dao;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.dao;
@@ -30,7 +33,7 @@
public class EmployeeDao extends AbstractDao {
- private static final long serialVersionUID = -6615310540042830594L;
+ private static final long serialVersionUID = -6615310540042830594L;
protected SkillDao skillDao;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.dao;
@@ -26,7 +29,7 @@
public class SkillDao extends AbstractDao {
- private static final long serialVersionUID = -8160406514074630866L;
+ private static final long serialVersionUID = -8160406514074630866L;
public Class getFeaturedClass() {
return Skill.class;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.exception;
@@ -24,8 +27,8 @@
public class CreateException extends StorageException {
- private static final long serialVersionUID = 6734349565111633783L;
-
+ private static final long serialVersionUID = 6734349565111633783L;
+
public CreateException(String message) {
super(message);
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.exception;
@@ -24,9 +27,9 @@
public class DeleteException extends StorageException {
- private static final long serialVersionUID = -5286362812955627352L;
+ private static final long serialVersionUID = -5286362812955627352L;
- public DeleteException(String message) {
+ public DeleteException(String message) {
super(message);
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.exception;
@@ -24,7 +27,7 @@
public class DuplicateKeyException extends CreateException {
- private static final long serialVersionUID = 989620752592415898L;
+ private static final long serialVersionUID = 989620752592415898L;
public DuplicateKeyException(String message) {
super(message);
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.exception;
@@ -24,8 +27,8 @@
public class StorageException extends Exception {
- private static final long serialVersionUID = -2528721270540362905L;
-
+ private static final long serialVersionUID = -2528721270540362905L;
+
public StorageException(String message) {
super(message);
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.exception;
@@ -25,8 +28,8 @@
public class UpdateException extends StorageException {
- private static final long serialVersionUID = -4728238600375630452L;
-
+ private static final long serialVersionUID = -4728238600375630452L;
+
public UpdateException(String message) {
super(message);
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.filedownload;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.fileupload;
@@ -27,23 +30,23 @@
*/
public class FileUploadAction extends ActionSupport {
- private static final long serialVersionUID = 5156288255337069381L;
-
- private String contentType;
+ private static final long serialVersionUID = 5156288255337069381L;
+
+ 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;
+ return fileName;
}
public void setUploadFileName(String fileName) {
- this.fileName = 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() {
@@ -53,7 +56,7 @@
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() {
@@ -63,7 +66,7 @@
this.upload = upload;
}
-
+
public String getCaption() {
return 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: FileUploadAction.java 432886 2006-08-19 22:03:04Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.fileupload;
@@ -23,7 +26,7 @@
/**
* Showcase action - mutiple file upload using array.
- *
+ *
* @version $Date$ $Id$
*/
public class MultipleFileUploadUsingArrayAction extends ActionSupport {
@@ -31,17 +34,17 @@
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:");
@@ -59,5 +62,5 @@
System.out.println("\n\n");
return SUCCESS;
}
-
+
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,25 +1,22 @@
-package org.apache.struts2.showcase.fileupload;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
/*
- * $Id: FileUploadAction.java 432886 2006-08-19 22:03:04Z tmjee $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
import com.opensymphony.xwork2.ActionSupport;
@@ -32,34 +29,34 @@
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) {
@@ -76,6 +73,6 @@
System.out.println("\n\n");
return SUCCESS;
}
-
-
+
+
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.freemarker;
@@ -26,29 +29,29 @@
import com.opensymphony.xwork2.util.OgnlValueStack;
/**
- * This is an example of a custom FreemarkerManager, mean to be
- * instantiated through Spring.
+ * This is an example of a custom FreemarkerManager, mean to be
+ * instantiated through Spring.
* <p/>
- *
+ *
* It will add into Freemarker's model
- * an utility class called {@link CustomFreemarkerManagerUtil} as a simple
+ * an utility class called {@link CustomFreemarkerManagerUtil} as a simple
* example demonstrating how to extends FreemarkerManager.
* <p/>
- *
- * The {@link CustomFreemarkerManagerUtil} will be created by Spring and
+ *
+ * The {@link CustomFreemarkerManagerUtil} will be created by Spring and
* injected through constructor injection.
* <p/>
*/
public class CustomFreemarkerManager extends FreemarkerManager {
-
- private CustomFreemarkerManagerUtil util;
-
- public CustomFreemarkerManager(CustomFreemarkerManagerUtil util) {
- this.util = util;
- }
-
- public void populateContext(ScopesHashModel model, OgnlValueStack stack, Object action, HttpServletRequest request, HttpServletResponse response) {
- super.populateContext(model, stack, action, request, response);
- model.put("customFreemarkerManagerUtil", util);
- }
+
+ private CustomFreemarkerManagerUtil util;
+
+ public CustomFreemarkerManager(CustomFreemarkerManagerUtil util) {
+ this.util = util;
+ }
+
+ public void populateContext(ScopesHashModel model, OgnlValueStack 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.showcase.freemarker;
@@ -21,19 +24,19 @@
import java.util.Date;
/**
- * This class is just a simple util that gets injected into
+ * This class is just a simple util that gets injected into
* {@link CustomFreemarkerManager} through Spring's constructor
- * injection, serving as a simple example in Struts' Showcase.
+ * injection, serving as a simple example in Struts' Showcase.
*/
public class CustomFreemarkerManagerUtil {
- 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 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());
+ }
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.struts2.showcase.hangman;
import java.util.Map;
@@ -7,33 +27,33 @@
import com.opensymphony.xwork2.ActionSupport;
public class GetUpdatedHangmanAction extends ActionSupport implements SessionAware {
-
- 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");
-
- return SUCCESS;
- }
-
- public void setSession(Map session) {
- this.session = session;
- }
-
- public Hangman getHangman() {
- return hangman;
- }
- public void setHangman(Hangman hangman) {
- this.hangman = hangman;
- }
+
+ 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");
+
+ return SUCCESS;
+ }
+
+ public void setSession(Map session) {
+ this.session = session;
+ }
+
+ public Hangman getHangman() {
+ return 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.struts2.showcase.hangman;
import java.util.Map;
@@ -7,33 +27,33 @@
import com.opensymphony.xwork2.ActionSupport;
public class GuessCharacterAction extends ActionSupport implements SessionAware {
-
- 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 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;
+ }
}