You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by jm...@apache.org on 2003/02/22 03:52:27 UTC
cvs commit: jakarta-struts/src/test/org/apache/struts/taglib SimpleBeanForTesting.java SimpleFormBeanForTesting.java
jmitchell 2003/02/21 18:52:27
Added: src/test/org/apache/struts/taglib SimpleBeanForTesting.java
SimpleFormBeanForTesting.java
Log:
A few more items
Revision Changes Path
1.1 jakarta-struts/src/test/org/apache/struts/taglib/SimpleBeanForTesting.java
Index: SimpleBeanForTesting.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Struts", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.struts.taglib;
import java.util.Collection;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
/**
* Simple bean for unit tests.
*
* @author James Mitchell
*/
public class SimpleBeanForTesting {
public SimpleBeanForTesting(){
super();
}
public SimpleBeanForTesting(List lst){
this.lst = lst;
}
public SimpleBeanForTesting(Map map){
this.map = map;
}
public SimpleBeanForTesting(String string){
this.string = string;
}
public SimpleBeanForTesting(Integer integerValue){
this.integerValue = integerValue;
}
private String string;
private Integer integerValue;
private Double doubleValue;
private List lst;
private Map map;
private Object nestedObject;
private Object[] array;
private Enumeration enumeration;
private Collection collection;
/**
* Returns the lst.
* @return List
*/
public List getList() {
return lst;
}
/**
* Returns the map.
* @return Map
*/
public Map getMap() {
return map;
}
/**
* Sets the lst.
* @param lst The lst to set
*/
public void setList(List lst) {
this.lst = lst;
}
/**
* Sets the map.
* @param map The map to set
*/
public void setMap(Map map) {
this.map = map;
}
/**
* Returns the string.
* @return String
*/
public String getString() {
return string;
}
/**
* Sets the string.
* @param string The string to set
*/
public void setString(String string) {
this.string = string;
}
/**
* Returns the lst.
* @return List
*/
public List getLst() {
return lst;
}
/**
* Sets the lst.
* @param lst The lst to set
*/
public void setLst(List lst) {
this.lst = lst;
}
/**
* Returns the Object Array.
* @return Object[]
*/
public Object[] getArray() {
return array;
}
/**
* Sets the Object Array .
* @param array The Object array to set
*/
public void setArray(Object[] array) {
this.array = array;
}
/**
* Returns the enumeration.
* @return Enumeration
*/
public Enumeration getEnumeration() {
return enumeration;
}
/**
* Sets the enumeration.
* @param enumeration The enumeration to set
*/
public void setEnumeration(Enumeration enumeration) {
this.enumeration = enumeration;
}
/**
* Returns the nestedObject.
* @return Object
*/
public Object getNestedObject() {
return nestedObject;
}
/**
* Sets the nestedObject.
* @param nestedObject The nestedObject to set
*/
public void setNestedObject(Object nestedObject) {
this.nestedObject = nestedObject;
}
/**
* Returns the collection.
* @return Collection
*/
public Collection getCollection() {
return collection;
}
/**
* Sets the collection.
* @param collection The collection to set
*/
public void setCollection(Collection collection) {
this.collection = collection;
}
/**
* Returns the doubleValue.
* @return Double
*/
public Double getDoubleValue() {
return doubleValue;
}
/**
* Returns the integerValue.
* @return Integer
*/
public Integer getIntegerValue() {
return integerValue;
}
/**
* Sets the doubleValue.
* @param doubleValue The doubleValue to set
*/
public void setDoubleValue(Double doubleValue) {
this.doubleValue = doubleValue;
}
/**
* Sets the integerValue.
* @param integerValue The integerValue to set
*/
public void setIntegerValue(Integer integerValue) {
this.integerValue = integerValue;
}
}
1.1 jakarta-struts/src/test/org/apache/struts/taglib/SimpleFormBeanForTesting.java
Index: SimpleFormBeanForTesting.java
===================================================================
/*
* $Header: /home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/SimpleFormBeanForTesting.java,v 1.1 2003/02/22 02:52:27 jmitchell Exp $
* $Revision: 1.1 $
* $Date: 2003/02/22 02:52:27 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Struts", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.struts.taglib;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.ValidatorForm;
/**
* Simple Form bean for the Cactus test cases.
* Feel free to add whatever you need to help with testing.
*
* @author James Mitchell
* @version $Revision: 1.1 $ $Date: 2003/02/22 02:52:27 $
*/
public final class SimpleFormBeanForTesting extends ValidatorForm {
private String field1 = null;
private String field2 = null;
// --------------------------------------------------------- Public Methods
/**
* Reset all properties to their default values.
*
* @param mapping The mapping used to select this instance
* @param request The servlet request we are processing
*/
public void reset(ActionMapping mapping, HttpServletRequest request) {
this.field1 = null;
this.field2 = null;
}
/**
* Returns the field1.
* @return String
*/
public String getField1() {
return field1;
}
/**
* Returns the field2.
* @return String
*/
public String getField2() {
return field2;
}
/**
* Sets the field1.
* @param field1 The field1 to set
*/
public void setField1(String field1) {
this.field1 = field1;
}
/**
* Sets the field2.
* @param field2 The field2 to set
*/
public void setField2(String field2) {
this.field2 = field2;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org