1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */ 
17   
18  package org.apache.commons.betwixt.dotbetwixt;
19  
20  import java.util.ArrayList;
21  import java.util.List;
22  
23  /** 
24    * This is a simple bean used to test customized updaters.
25    *
26    * @author Robert Burrell Donkin
27    */
28  public class MixedUpdatersBean extends PrivateMethodsBean {
29      
30  //-------------------------- Attributes
31      private String name;
32      private String badName = "**UNSET**";
33      private List items = new ArrayList();
34      private List badItems = new ArrayList();
35      private String privateProperty;
36      private List privateItems = new ArrayList(3);
37  
38  //-------------------------- Constructors
39  
40      public MixedUpdatersBean() {}
41  
42      public MixedUpdatersBean(String name) {
43          setName(name);
44      }
45  	        
46  //--------------------------- Properties
47  
48      public String getName() {
49          return name;
50      }
51      
52      public void setName(String name) {
53          this.name = name;
54      }	
55      
56      public List getItems() {
57          return items;
58      }
59      
60      public void addItem(String item) {
61          items.add(item);
62      }
63      
64      public String getBadName() {
65          return badName;
66      }
67      
68      public void badNameSetter(String badName) {
69          this.badName = badName;
70      }
71      
72      public List getBadItems() {
73          return badItems;
74      }
75      
76      public void badItemAdder(String badItem) {
77          badItems.add(badItem);
78      }	
79  
80      public String getPrivateProperty() {
81          return privateProperty;
82      }
83  
84      protected void setPrivateProperty(String privateProp) {
85          this.privateProperty = privateProp;
86      }	
87      public void privatePropertyWorkaroundSetter(String privateProp) {
88          this.privateProperty = privateProp;
89      }
90  
91      public List getPrivateItems() {
92          return privateItems;
93      }
94  
95      private void addPrivateItem(String item) {
96          privateItems.add(item);
97      }
98  }