001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.commons.betwixt.dotbetwixt;
019:
020: import java.util.ArrayList;
021: import java.util.List;
022:
023: /**
024: * This is a simple bean used to test customized updaters.
025: *
026: * @author Robert Burrell Donkin
027: */
028: public class MixedUpdatersBean extends PrivateMethodsBean {
029:
030: //-------------------------- Attributes
031: private String name;
032: private String badName = "**UNSET**";
033: private List items = new ArrayList();
034: private List badItems = new ArrayList();
035: private String privateProperty;
036: private List privateItems = new ArrayList(3);
037:
038: //-------------------------- Constructors
039:
040: public MixedUpdatersBean() {
041: }
042:
043: public MixedUpdatersBean(String name) {
044: setName(name);
045: }
046:
047: //--------------------------- Properties
048:
049: public String getName() {
050: return name;
051: }
052:
053: public void setName(String name) {
054: this .name = name;
055: }
056:
057: public List getItems() {
058: return items;
059: }
060:
061: public void addItem(String item) {
062: items.add(item);
063: }
064:
065: public String getBadName() {
066: return badName;
067: }
068:
069: public void badNameSetter(String badName) {
070: this .badName = badName;
071: }
072:
073: public List getBadItems() {
074: return badItems;
075: }
076:
077: public void badItemAdder(String badItem) {
078: badItems.add(badItem);
079: }
080:
081: public String getPrivateProperty() {
082: return privateProperty;
083: }
084:
085: protected void setPrivateProperty(String privateProp) {
086: this .privateProperty = privateProp;
087: }
088:
089: public void privatePropertyWorkaroundSetter(String privateProp) {
090: this .privateProperty = privateProp;
091: }
092:
093: public List getPrivateItems() {
094: return privateItems;
095: }
096:
097: private void addPrivateItem(String item) {
098: privateItems.add(item);
099: }
100: }
|