henning 2002/06/07 14:37:02
Modified: src/java/org/apache/turbine/services/intake/model
FloatField.java
src/java/org/apache/turbine/services/security/ldap/util
ParseExceptionMessage.java
Log:
ran through import scrubber
removed DOS Line endings (Yuck :-) )
Revision Changes Path
1.2 +131 -131
jakarta-turbine-2/src/java/org/apache/turbine/services/intake/model/FloatField.java
Index: FloatField.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/intake/model/FloatField.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FloatField.java 27 Dec 2001 18:45:32 -0000 1.1
+++ FloatField.java 7 Jun 2002 21:37:02 -0000 1.2
@@ -1,131 +1,131 @@
-package org.apache.turbine.services.intake.model;
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 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 acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Turbine" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
- * written permission, please contact [EMAIL PROTECTED]
- *
- * 5. Products derived from this software may not be called "Apache",
- * "Apache Turbine", nor may "Apache" appear in their name, without
- * prior written permission of the Apache Software Foundation.
- *
- * 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/>.
- */
-
-import org.apache.turbine.services.intake.xmlmodel.Rule;
-import org.apache.turbine.services.intake.xmlmodel.XmlField;
-import org.apache.turbine.util.ParameterParser;
-import org.apache.turbine.util.Log;
-
-/**
- * Creates Field objects.
- *
- * @author <a href="mailto:[EMAIL PROTECTED]>Ronald Wekker</a>
- * @version $Id: FloatField.java,v 1.1 2001/12/27 18:45:32 jmcnally Exp $
- */
-
-public class FloatField extends Field
-{
-
- public FloatField(XmlField field, Group group)
- throws Exception
- {
- super(field, group);
- }
-
- /**
- * Sets the default value for an Float
- */
-
- protected void setDefaultValue(String prop)
- {
- defaultValue = null;
-
- if(prop == null)
- {
- return;
- }
-
- try
- {
- defaultValue = new Float(prop);
- }
- catch(Exception e)
- {
- Log.error("Could not convert "+prop+" into an Float. ("+name+")");
- }
- }
-
- /**
- * A suitable validator.
- *
- * @return "FloatValidator"
- */
- protected String getDefaultValidator()
- {
- return "org.apache.turbine.services.intake.validator.NumberValidator";
- }
-
- /**
- * converts the parameter to the correct Object.
- */
- protected void doSetValue(ParameterParser pp)
- {
- if ( isMultiValued )
- {
- String[] ss = pp.getStrings(getKey());
- float[] ival = new float[ss.length];
- for (int i=0; i<ss.length; i++)
- {
- ival[i] = Float.parseFloat(ss[i]);
- }
- setTestValue(ival);
- }
- else
- {
- setTestValue(new Float(pp.getString(getKey())));
- }
- }
-}
+package org.apache.turbine.services.intake.model;
+
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Turbine", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * 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/>.
+ */
+
+import org.apache.turbine.services.intake.xmlmodel.XmlField;
+
+import org.apache.turbine.util.Log;
+import org.apache.turbine.util.ParameterParser;
+
+/**
+ * Creates Field objects.
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]>Ronald Wekker</a>
+ * @version $Id: FloatField.java,v 1.2 2002/06/07 21:37:02 henning Exp $
+ */
+
+public class FloatField extends Field
+{
+
+ public FloatField(XmlField field, Group group)
+ throws Exception
+ {
+ super(field, group);
+ }
+
+ /**
+ * Sets the default value for an Float
+ */
+
+ protected void setDefaultValue(String prop)
+ {
+ defaultValue = null;
+
+ if(prop == null)
+ {
+ return;
+ }
+
+ try
+ {
+ defaultValue = new Float(prop);
+ }
+ catch(Exception e)
+ {
+ Log.error("Could not convert "+prop+" into an Float. ("+name+")");
+ }
+ }
+
+ /**
+ * A suitable validator.
+ *
+ * @return "FloatValidator"
+ */
+ protected String getDefaultValidator()
+ {
+ return "org.apache.turbine.services.intake.validator.NumberValidator";
+ }
+
+ /**
+ * converts the parameter to the correct Object.
+ */
+ protected void doSetValue(ParameterParser pp)
+ {
+ if ( isMultiValued )
+ {
+ String[] ss = pp.getStrings(getKey());
+ float[] ival = new float[ss.length];
+ for (int i=0; i<ss.length; i++)
+ {
+ ival[i] = Float.parseFloat(ss[i]);
+ }
+ setTestValue(ival);
+ }
+ else
+ {
+ setTestValue(new Float(pp.getString(getKey())));
+ }
+ }
+}
1.2 +91 -90
jakarta-turbine-2/src/java/org/apache/turbine/services/security/ldap/util/ParseExceptionMessage.java
Index: ParseExceptionMessage.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/services/security/ldap/util/ParseExceptionMessage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ParseExceptionMessage.java 16 Aug 2001 05:09:21 -0000 1.1
+++ ParseExceptionMessage.java 7 Jun 2002 21:37:02 -0000 1.2
@@ -1,90 +1,91 @@
-package org.apache.turbine.services.security.ldap.util;
-
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 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 acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Turbine" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
- * written permission, please contact [EMAIL PROTECTED]
- *
- * 5. Products derived from this software may not be called "Apache",
- * "Apache Turbine", nor may "Apache" appear in their name, without
- * prior written permission of the Apache Software Foundation.
- *
- * 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/>.
- */
-
-import java.util.StringTokenizer;
-import org.apache.turbine.util.Log;
-
-/**
- * A utility class used to parse the erno out of the message string
- *
- * @author <a href="mailto:[EMAIL PROTECTED]">Tracy M. Adewunmi</a>
- * @author <a href="mailto:[EMAIL PROTECTED]">Leonard J. Flournoy</a>
- * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: ParseExceptionMessage.java,v 1.1 2001/08/16 05:09:21 jvanzyl Exp $
- */
-public class ParseExceptionMessage
-{
- /**
- * Extract the errno from the err msg
- *
- * @param String msg usually derived from error.getMessage()
- *
- * Exception that occur at this level should be handled by the calling
- * class
- */
- public static String findErrno(String msg)
- {
- Log.info("original erro msg: " + msg);
- StringTokenizer sT = new StringTokenizer(msg, ",");
- String temp = sT.nextToken();
- sT = new StringTokenizer(temp, ":");
- while (sT.hasMoreTokens())
- {
- temp = sT.nextToken(":");
- }
- return temp;
- }
-}
+package org.apache.turbine.services.security.ldap.util;
+
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 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 acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Turbine" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact [EMAIL PROTECTED]
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Turbine", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * 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/>.
+ */
+
+import java.util.StringTokenizer;
+
+import org.apache.turbine.util.Log;
+
+/**
+ * A utility class used to parse the erno out of the message string
+ *
+ * @author <a href="mailto:[EMAIL PROTECTED]">Tracy M. Adewunmi</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Leonard J. Flournoy</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
+ * @version $Id: ParseExceptionMessage.java,v 1.2 2002/06/07 21:37:02 henning Exp $
+ */
+public class ParseExceptionMessage
+{
+ /**
+ * Extract the errno from the err msg
+ *
+ * @param String msg usually derived from error.getMessage()
+ *
+ * Exception that occur at this level should be handled by the calling
+ * class
+ */
+ public static String findErrno(String msg)
+ {
+ Log.info("original erro msg: " + msg);
+ StringTokenizer sT = new StringTokenizer(msg, ",");
+ String temp = sT.nextToken();
+ sT = new StringTokenizer(temp, ":");
+ while (sT.hasMoreTokens())
+ {
+ temp = sT.nextToken(":");
+ }
+ return temp;
+ }
+}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>