You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by rl...@apache.org on 2002/01/29 00:30:34 UTC
cvs commit: jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty MiscBean.java PBooleanPropertyEditor.java PIntegerPropertyEditor.java PStringPropertyEditor.java PropertyBean.java PropertyBeanBeanInfo.java SetpropBean.java
rlubke 02/01/28 15:30:34
Added: src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty
MiscBean.java PBooleanPropertyEditor.java
PIntegerPropertyEditor.java
PStringPropertyEditor.java PropertyBean.java
PropertyBeanBeanInfo.java SetpropBean.java
Log:
- added for new/modified tests
Revision Changes Path
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/MiscBean.java
Index: MiscBean.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/MiscBean.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
public class MiscBean {
//Declaring the variables
private boolean primitiveBoolean;
private Boolean objectBoolean;
private byte primitiveByte;
private Byte objectByte;
private char primitiveChar;
private Character objectChar;
private double primitiveDouble;
private Double objectDouble;
private int primitiveInt;
private Integer objectInt;
private float primitiveFloat;
private Float objectFloat;
private long primitiveLong;
private Long objectLong;
private String path;
/** we define set and get methods for boolean
* variable
*/
public void setPrimitiveBoolean( boolean b ) {
this.primitiveBoolean = b;
}
public boolean getPrimitiveBoolean() {
return primitiveBoolean;
}
/** we define set and get methods for Boolean
* variable
*/
public void setObjectBoolean( Boolean b ) {
this.objectBoolean = b;
}
public Boolean getObjectBoolean() {
return objectBoolean;
}
/** we define set and get methods for byte
* variable
*/
public void setPrimitiveByte( byte b ) {
this.primitiveByte = b;
}
public byte getPrimitiveByte() {
return primitiveByte;
}
/** we define set and get methods for Byte
* variable
*/
public void setObjectByte( Byte b ) {
this.objectByte = b;
}
public Byte getObjectByte() {
return objectByte;
}
/** we define set and get methods for char
* variable
*/
public void setPrimitiveChar( char b ) {
this.primitiveChar = b;
}
public char getPrimitiveChar() {
return primitiveChar;
}
/** we define set and get methods for Character
* variable
*/
public void setObjectChar( Character b ) {
this.objectChar = b;
}
public Character getObjectChar() {
return objectChar;
}
/** we define set and get methods for double
* variable
*/
public void setPrimitiveDouble( double b ) {
this.primitiveDouble = b;
}
public double getPrimitiveDouble() {
return primitiveDouble;
}
/** we define set and get methods for Double
* variable
*/
public void setObjectDouble( Double b ) {
this.objectDouble = b;
}
public Double getObjectDouble() {
return objectDouble;
}
/** we define set and get methods for int
* variable
*/
public void setPrimitiveInt( int i ) {
primitiveInt = i;
}
public int getPrimitiveInt() {
return primitiveInt;
}
/** we define set and get methods for Integer
* variable
*/
public void setObjectInt( Integer in ) {
this.objectInt = in;
}
public Integer getObjectInt() {
return objectInt;
}
/** we define set and get methods for float
* variable
*/
public void setPrimitiveFloat( float f ) {
primitiveFloat = f;
}
public float getPrimitiveFloat() {
return primitiveFloat;
}
/** we define set and get methods for Float
* variable
*/
public void setObjectFloat( Float fl ) {
this.objectFloat = fl;
}
public Float getObjectFloat() {
return objectFloat;
}
/** we define set and get methods for long
* variable
*/
public void setPrimitiveLong( long l ) {
primitiveLong = l;
}
public long getPrimitiveLong() {
return primitiveLong;
}
/** we define set and get methods for Long
* variable
*/
public void setObjectLong( Long ln ) {
this.objectLong = ln;
}
public Long getObjectLong() {
return objectLong;
}
/** we define set and get methods for path
* variable which is a String
*/
public void setPath( String path ) {
this.path = path;
}
public String getPath() {
return path;
}
}
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PBooleanPropertyEditor.java
Index: PBooleanPropertyEditor.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PBooleanPropertyEditor.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
import java.beans.PropertyEditorSupport;
/**
* PBooleanPropertyEditor.java
*
* Created: Tue Oct 23 09:55:50 2001
*
* @version $Revision: 1.1 $
*/
public class PBooleanPropertyEditor extends PropertyEditorSupport
{
public PBooleanPropertyEditor () {
}
/**
* Sets a Boolean value via a String
* @param param1 String value of "true" or "false"
* @exception java.lang.IllegalArgumentException if unable to set the property.
*/
public void setAsText(String param1) throws IllegalArgumentException {
if ( param1.equals( "true" ) ) {
setValue( new Boolean( "false" ) );
} else {
setValue( new Boolean( "true" ) );
}
}
}// PBooleanPropertyEditor
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PIntegerPropertyEditor.java
Index: PIntegerPropertyEditor.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PIntegerPropertyEditor.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
import java.beans.PropertyEditorSupport;
/**
* PIntegerPropertyEditor.java
*
* Created: Tue Oct 23 10:01:17 2001
*
* @version $Revision: 1.1 $
*/
public class PIntegerPropertyEditor extends PropertyEditorSupport
{
public PIntegerPropertyEditor () {
}
/**
* Sets an Integer property via a String value
* @param param1 a valid String-based integer value. The String value of "314"
* will be appended to whatever value is passed.
* @exception java.lang.IllegalArgumentException if unable to set property
*/
public void setAsText(String param1) throws IllegalArgumentException {
setValue( new Integer( param1 + "314" ) );
}
}// PIntegerPropertyEditor
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PStringPropertyEditor.java
Index: PStringPropertyEditor.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PStringPropertyEditor.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
import java.beans.PropertyEditorSupport;
/**
* PStringPropertyEditor.java
*
* Created: Tue Oct 23 09:40:37 2001
*
* @version $Revision: 1.1 $
*/
public class PStringPropertyEditor extends PropertyEditorSupport
{
public PStringPropertyEditor () {
}
/**
* Set a String property via a String value
* @param param1 a string value. The String "PString" will
* be prepended to any value passed.
* @exception java.lang.IllegalArgumentException if unable to set the property.
*/
public void setAsText(String param1) throws IllegalArgumentException {
setValue( new String( "PString " + param1 ) );
}
}// PStringPropertyEditor
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PropertyBean.java
Index: PropertyBean.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PropertyBean.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
import java.io.Serializable;
/**
* PropertyBean.java
* Simple Java Bean to verify that a JSP Container
* will make use of a Bean's PropertyEditory class
* if one is available.
*
* Created: Tue Oct 23 09:28:19 2001
*
* @version $Revision: 1.1 $
*/
public class PropertyBean implements Serializable
{
private String _pString = null;
private Boolean _pBoolean = null;
private Integer _pInt = null;
public PropertyBean () {
_pString = "StringValue";
_pBoolean = new Boolean( "false" );
_pInt = new Integer( "10" );
}
/**
* Get the value of pString.
* @return value of pString.
*/
public String getPString() {
return _pString;
}
/**
* Set the value of pString.
* @param v Value to assign to pString.
*/
public void setPString( String v ) {
this._pString = v;
}
/**
* Get the value of pBoolean.
* @return value of pBoolean.
*/
public Boolean getPBoolean() {
return _pBoolean;
}
/**
* Set the value of pBoolean.
* @param v Value to assign to pBoolean.
*/
public void setPBoolean( Boolean v ) {
this._pBoolean = v;
}
/**
* Get the value of pInt.
* @return value of pInt.
*/
public Integer getPInteger() {
return _pInt;
}
/**
* Set the value of pInt.
* @param v Value to assign to pInt.
*/
public void setPInteger( Integer v ) {
this._pInt = v;
}
}// PropertyBean
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PropertyBeanBeanInfo.java
Index: PropertyBeanBeanInfo.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/PropertyBeanBeanInfo.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
import java.beans.PropertyDescriptor;
import java.beans.IntrospectionException;
import java.beans.SimpleBeanInfo;
/**
* PropertyBeanBeanInfo.java
*
* Created: Tue Oct 23 10:04:37 2001
*
* @version $Revision: 1.1 $
*/
public class PropertyBeanBeanInfo extends SimpleBeanInfo
{
private PropertyDescriptor[] pd = null;
public PropertyBeanBeanInfo () {
}
/**
* Returns an array of PropertyDescriptors
* @return an array of PropertyDescriptors describing the PropertyBean's
* exposed properties.
*/
public PropertyDescriptor[] getPropertyDescriptors() {
if ( pd == null ) {
try {
pd = new PropertyDescriptor[] {
new PropertyDescriptor( "PString" ,PropertyBean.class ),
new PropertyDescriptor( "PBoolean", PropertyBean.class ),
new PropertyDescriptor( "PInteger", PropertyBean.class )
};
pd[ 0 ].setPropertyEditorClass( PStringPropertyEditor.class );
pd[ 1 ].setPropertyEditorClass( PBooleanPropertyEditor.class );
pd[ 2 ].setPropertyEditorClass( PIntegerPropertyEditor.class );
} catch ( IntrospectionException ie ) {
pd = super.getPropertyDescriptors();
}
}
return pd;
}
}// PropertyBeanBeanInfo
1.1 jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/SetpropBean.java
Index: SetpropBean.java
===================================================================
/*
* $Header: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/classes/core_syntax/actions/setProperty/SetpropBean.java,v 1.1 2002/01/28 23:30:34 rlubke Exp $
* $Revision: 1.1 $
* $Date: 2002/01/28 23:30:34 $
*
* ====================================================================
* 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", "Tomcat", 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 core_syntax.actions.setProperty;
public class SetpropBean {
//Declaring the variables
private String name = "hello";
private int num = 0;
private String str;
private int[] iArray = {15, 20, 35};
private byte[] bArray = null;
private char[] cArray = null;
private short[] sArray = null;
private float[] fArray = null;
private long[] lArray = null;
private double[] dArray = null;
private boolean[] boArray = null;
private Byte[] byteArray = null;
private Character[] charArray = null;
private Short[] shortArray = null;
private Integer[] integerArray = null;
private Float[] floatArray = null;
private Long[] longArray = null;
private Double[] doubleArray = null;
private Boolean[] booleanArray = null;
private String bar = "read-only";
/**
* Property 'Str'
*/
public String getStr() {
return str;
}
public void setStr( String a ) {
this.str = a;
}
/**
* Property 'Name'
*/
public String getName() {
return name;
}
public void setName( String s ) {
this.name = s;
}
/**
* Property 'Num'
*/
public int getNum() {
return num;
}
public void setNum( int numb ) {
this.num = numb;
}
/**
* property 'intAry'
* This is an indexed property
*/
public int[] getIArray() {
return iArray;
}
public void setIArray( int[] i ) {
this.iArray = i;
}
public byte[] getBArray() {
return bArray;
}
public void setBArray( byte[] b ) {
this.bArray = b;
}
public char[] getCArray() {
return cArray;
}
public void setCArray( char[] c ) {
this.cArray = c;
}
public short[] getSArray() {
return sArray;
}
public void setSArray( short[] s ) {
this.sArray = s;
}
public float[] getFArray() {
return fArray;
}
public void setFArray( float[] f ) {
this.fArray = f;
}
public double[] getDArray() {
return dArray;
}
public void setDArray( double[] d ) {
this.dArray = d;
}
public long[] getLArray() {
return lArray;
}
public void setLArray( long[] l ) {
this.lArray = l;
}
public boolean[] getBoArray() {
return boArray;
}
public void setBoArray( boolean[] b ) {
this.boArray = b;
}
public Byte[] getByteArray() {
return byteArray;
}
public void setByteArray( Byte[] b ) {
this.byteArray = b;
}
public Character[] getCharArray() {
return charArray;
}
public void setCharArray( Character[] c ) {
this.charArray = c;
}
public Short[] getShortArray() {
return shortArray;
}
public void setShortArray( Short[] s ) {
this.shortArray = s;
}
public Integer[] getIntegerArray() {
return integerArray;
}
public void setIntegerArray( Integer[] i ) {
this.integerArray = i;
}
public Float[] getFloatArray() {
return floatArray;
}
public void setFloatArray( Float[] f ) {
this.floatArray = f;
}
public Long[] getLongArray() {
return longArray;
}
public void setLongArray( Long[] l ) {
this.longArray = l;
}
public Double[] getDoubleArray() {
return doubleArray;
}
public void setDoubleArray( Double[] d ) {
this.doubleArray = d;
}
public Boolean[] getBooleanArray() {
return booleanArray;
}
public void setBooleanArray( Boolean[] b ) {
this.booleanArray = b;
}
/**
* property 'bar'
* This is a read only property
*/
public String getBar() {
return bar;
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>