You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/09 14:40:22 UTC

svn commit: r675148 - in /myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples: ballot/backings/ ballot/dao/ ballot/model/ dynaForm/model/ mops/backings/ multibean/ simple/backings/ simple/model/

Author: skitching
Date: Wed Jul  9 05:40:21 2008
New Revision: 675148

URL: http://svn.apache.org/viewvc?rev=675148&view=rev
Log:
Checkstyle Fixes

Modified:
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotTopicVotes.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopic.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopicCmp.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/ItemDao.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoteDao.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoterDao.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Item.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Vote.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Voter.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/multibean/MultibeanController.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/backings/ReservationView.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/Reservation.java
    myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/ReservationBook.java

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotTopicVotes.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotTopicVotes.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotTopicVotes.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotTopicVotes.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopic.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopic.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopic.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopic.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopicCmp.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopicCmp.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopicCmp.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/backings/BallotVoteTopicCmp.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/ItemDao.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/ItemDao.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/ItemDao.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/ItemDao.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoteDao.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoteDao.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoteDao.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoteDao.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoterDao.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoterDao.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoterDao.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/dao/VoterDao.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Item.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Item.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Item.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Item.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Vote.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Vote.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Vote.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Vote.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Voter.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Voter.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Voter.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/ballot/model/Voter.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/dynaForm/model/SimpleEntity.java Wed Jul  9 05:40:21 2008
@@ -1,8 +1,4 @@
 /*
- * Copyright (c) 2007, Your Corporation. All Rights Reserved.
- */
-
-/*
  * 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

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/PetstoreData.java Wed Jul  9 05:40:21 2008
@@ -1,3 +1,21 @@
+/*
+ * 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.myfaces.examples.mops.backings;
 
 import org.apache.myfaces.examples.mops.dao.ProductDao;

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/SearchProduct.java Wed Jul  9 05:40:21 2008
@@ -1,3 +1,21 @@
+/*
+ * 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.myfaces.examples.mops.backings;
 
 import org.apache.myfaces.examples.mops.dao.ProductDao;

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/mops/backings/Security.java Wed Jul  9 05:40:21 2008
@@ -1,3 +1,21 @@
+/*
+ * 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.myfaces.examples.mops.backings;
 
 

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/multibean/MultibeanController.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/multibean/MultibeanController.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/multibean/MultibeanController.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/multibean/MultibeanController.java Wed Jul  9 05:40:21 2008
@@ -24,15 +24,18 @@
 {
     String conversationName;
 
-    public void setConversationName(String conversationName) {
+    public void setConversationName(String conversationName)
+    {
         this.conversationName = conversationName;
     }
     
-    public String getConversationName() {
+    public String getConversationName()
+    {
         return conversationName;
     }
     
-    public String clearConversation() {
+    public String clearConversation()
+    {
         ConversationUtils.invalidateIfExists(conversationName);
         return null;
     }

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/backings/ReservationView.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/backings/ReservationView.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/backings/ReservationView.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/backings/ReservationView.java Wed Jul  9 05:40:21 2008
@@ -37,72 +37,91 @@
     private Reservation reservation;
     private boolean viewMode = false;
     private String reservationState;
-    
 
-    public int getInstanceId() {
+    public int getInstanceId()
+    {
         return System.identityHashCode(this);
     }
 
-    public void setBook(ReservationBook book) {
+    public void setBook(ReservationBook book)
+    {
         this.book = book;
     }
 
-    public Reservation getReservation() {
+    public Reservation getReservation()
+    {
         if (reservation == null)
+        {
             reservation = new Reservation();
+        }
         return reservation;
     }
 
-    public void setReservation(Reservation reservation) {
+    public void setReservation(Reservation reservation)
+    {
         this.reservation = reservation;
         this.viewMode = true;
     }
 
-    public boolean getViewMode() {
+    public boolean getViewMode()
+    {
         return viewMode;
     }
-    
-    public String getReservationState() {
+
+    public String getReservationState()
+    {
         return reservationState;
     }
 
-    private boolean isAvailable(Date start, int days) {
+    private boolean isAvailable(Date start, int days)
+    {
         // the logic here would normally be on some "business service" class rather
         // than buried here inside the presentation class...
-        
+
         // The hotel is closed on sat/sun nights.
         // Calendar.SUNDAY=1, SATURDAY=6
         Calendar cal = Calendar.getInstance();
         cal.setTime(start);
         int dow = cal.get(Calendar.DAY_OF_WEEK);
         if (dow == Calendar.SUNDAY)
+        {
             return false;
+        }
         if (dow + days > Calendar.SATURDAY)
+        {
             return false;
+        }
 
         // otherwise, ok
         return true;
     }
 
-    public String checkAvailability() {
-        if (isAvailable(reservation.getStart(), reservation.getDays())) {
+    public String checkAvailability()
+    {
+        if (isAvailable(reservation.getStart(), reservation.getDays()))
+        {
             reservationState = "Available";
-        } else {
+        }
+        else
+        {
             reservationState = "Not available";
         }
         return null;
     }
-    
-    public String save() {
-        if (isAvailable(reservation.getStart(), reservation.getDays())) {
+
+    public String save()
+    {
+        if (isAvailable(reservation.getStart(), reservation.getDays()))
+        {
             book.getReservations().add(reservation);
             return "save";
         }
         reservationState = "Not Available";
         return null;
     }
-    
-    public String remove() {
+
+    public String remove()
+    {
         book.getReservations().remove(reservation);
         return "delete";
     }

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/Reservation.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/Reservation.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/Reservation.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/Reservation.java Wed Jul  9 05:40:21 2008
@@ -27,27 +27,33 @@
     private Date start;
     private int days;
 
-    public String getName() {
+    public String getName()
+    {
         return name;
     }
     
-    public void setName(String name) {
+    public void setName(String name)
+    {
         this.name = name;
     }
     
-    public Date getStart() {
+    public Date getStart()
+    {
         return start;
     }
     
-    public void setStart(Date start) {
+    public void setStart(Date start)
+    {
         this.start = start;
     }
     
-    public int getDays() {
+    public int getDays()
+    {
         return days;
     }
     
-    public void setDays(int days) {
+    public void setDays(int days)
+    {
         this.days = days;
     }
 }

Modified: myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/ReservationBook.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/ReservationBook.java?rev=675148&r1=675147&r2=675148&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/ReservationBook.java (original)
+++ myfaces/orchestra/trunk/examples/src/main/java/org/apache/myfaces/examples/simple/model/ReservationBook.java Wed Jul  9 05:40:21 2008
@@ -25,7 +25,8 @@
 {
     private List reservations = new ArrayList();
 
-    public List getReservations() {
+    public List getReservations()
+    {
         return reservations;
     }
 }