dion 2004/09/09 05:06:42
Modified: jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean
Product.java Order.java MyTagLibrary.java
Customer.java TestJelly.java CustomerTag.java
MyBeanTagLibrary.java
jelly/jelly-tags/bean/src/java/org/apache/commons/jelly/tags/bean
BeanTag.java BeanPropertyTag.java
jelly/jelly-tags/avalon/src/java/org/apache/commons/jelly/avalon
JellyService.java
Log:
Fix license file whitespace
Revision Changes Path
1.4 +7 -7 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Product.java
Index: Product.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Product.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Product.java 25 Feb 2004 01:31:50 -0000 1.3
+++ Product.java 9 Sep 2004 12:06:41 -0000 1.4
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-/**
+/**
* A sample bean that we can construct via Jelly tags
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -31,10 +31,10 @@
private String id;
private String name;
-
+
public Product() {
}
-
+
public String toString() {
return "Product[id=" + id + ";name=" + name + "]";
}
1.5 +9 -9 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Order.java
Index: Order.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Order.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Order.java 25 Feb 2004 01:31:50 -0000 1.4
+++ Order.java 9 Sep 2004 12:06:41 -0000 1.5
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,7 +18,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-/**
+/**
* A sample bean that we can construct via Jelly tags
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -32,15 +32,15 @@
private Product product;
private int amount;
private double price;
-
+
public Order() {
}
-
+
public String toString() {
return "Order[amount=" + amount + ";price=" + price + ";product=" + product + "]";
}
-
- /**
+
+ /**
* Factory method to create a new Product
public Product createProduct() {
return new Product();
1.7 +8 -8 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/MyTagLibrary.java
Index: MyTagLibrary.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/MyTagLibrary.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MyTagLibrary.java 25 Feb 2004 01:31:50 -0000 1.6
+++ MyTagLibrary.java 9 Sep 2004 12:06:41 -0000 1.7
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,7 +23,7 @@
import org.xml.sax.Attributes;
-/**
+/**
* A normal tag library which will use a BeanTag to create beans but this tag
* library does not derive from BeanTagLibrary and so does not have a <
* beandef> tag
@@ -35,8 +35,8 @@
public MyTagLibrary() {
}
-
-
+
+
// TagLibrary interface
//-------------------------------------------------------------------------
public TagScript createTagScript(String name, Attributes attributes) throws JellyException
{
@@ -70,7 +70,7 @@
/**
* Return the bean class that we should use for the given element name
- *
+ *
* @param name is the XML element name
* @param attributes the XML attributes
* @return Class the bean class to use for this element or null if the tag
1.5 +17 -17 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Customer.java
Index: Customer.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Customer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Customer.java 25 Feb 2004 01:31:50 -0000 1.4
+++ Customer.java 9 Sep 2004 12:06:41 -0000 1.5
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@
import java.util.Iterator;
import java.util.List;
-/**
+/**
* A sample bean that we can construct via Jelly tags
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -30,26 +30,26 @@
private String name;
private String location;
private List orders = new ArrayList();
-
-
+
+
public Customer() {
}
-
+
public Customer(String name) {
setName(name);
}
-
+
public Customer(String name, String location) {
setName(name);
setLocation(location);
}
-
+
public Customer(String name, String location, Order anOrder) {
setName(name);
setLocation(location);
addOrder(anOrder);
}
-
+
public Customer(Customer cust) {
setName(cust.getName());
setLocation(cust.getLocation());
@@ -60,29 +60,29 @@
}
}
}
-
+
public String toString() {
return super.toString() + "[name=" + name + ";location=" + location + "]";
}
/**
- * Creates a new Order object
+ * Creates a new Order object
*/
public Order createOrder() {
return new Order();
- }
+ }
public List getOrders() {
return orders;
}
-
+
public void addOrder(Order order) {
orders.add(order);
}
-
+
public void removeOrder(Order order) {
orders.remove(order);
- }
+ }
/**
* Returns the location.
1.4 +7 -7 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/TestJelly.java
Index: TestJelly.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/TestJelly.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestJelly.java 25 Feb 2004 01:31:50 -0000 1.3
+++ TestJelly.java 9 Sep 2004 12:06:41 -0000 1.4
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
import org.apache.commons.jelly.tags.junit.JellyTestSuite;
-/**
+/**
* A helper class to run jelly test cases as part of Ant's JUnit tests
*
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
@@ -31,8 +31,8 @@
public static void main( String[] args ) throws Exception {
TestRunner.run( suite() );
}
-
+
public static TestSuite suite() throws Exception {
- return createTestSuite(TestJelly.class, "suite.jelly");
+ return createTestSuite(TestJelly.class, "suite.jelly");
}
}
1.4 +4 -4 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/CustomerTag.java
Index: CustomerTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/CustomerTag.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CustomerTag.java 25 Feb 2004 01:31:50 -0000 1.3
+++ CustomerTag.java 9 Sep 2004 12:06:41 -0000 1.4
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,7 +23,7 @@
* we implement the BeanSource interface, and that the bean returned from the
* getBean() method supplies the appropriate create[nested tag name] and/or
* add[nested tag name] methods.
- *
+ *
* @author Christian Sell
* @version CustomerTag.java,v 1.1 2003/01/21 15:16:32 jstrachan Exp
*/
1.5 +6 -6 jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/MyBeanTagLibrary.java
Index: MyBeanTagLibrary.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/MyBeanTagLibrary.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MyBeanTagLibrary.java 25 Feb 2004 01:31:50 -0000 1.4
+++ MyBeanTagLibrary.java 9 Sep 2004 12:06:41 -0000 1.5
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,9 +17,9 @@
import org.apache.commons.jelly.tags.bean.BeanTagLibrary;
-/**
- * Describes the Taglib.
- * This could be created via Jelly script, or could load the mapping of
+/**
+ * Describes the Taglib.
+ * This could be created via Jelly script, or could load the mapping of
* tag names to bean classes from properties file etc but is implemented in Java
* code for simplicity
*
1.11 +16 -16 jakarta-commons/jelly/jelly-tags/bean/src/java/org/apache/commons/jelly/tags/bean/BeanTag.java
Index: BeanTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/java/org/apache/commons/jelly/tags/bean/BeanTag.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- BeanTag.java 25 Feb 2004 01:31:53 -0000 1.10
+++ BeanTag.java 9 Sep 2004 12:06:41 -0000 1.11
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,10 +31,10 @@
import org.apache.commons.logging.LogFactory;
-/**
+/**
* Creates a bean for the given tag which is then either output as a variable
* or can be added to a parent tag.
- *
+ *
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
* @author Christian Sell
* @version $Revision$
@@ -68,10 +68,10 @@
super(defaultClass);
this.tagName = tagName;
this.invokeMethod = invokeMethod;
-
+
if (tagName.length() > 0) {
- addMethodName = "add"
- + tagName.substring(0,1).toUpperCase()
+ addMethodName = "add"
+ + tagName.substring(0,1).toUpperCase()
+ tagName.substring(1);
}
}
@@ -91,17 +91,17 @@
if (var != null) {
context.setVariable(var, bean);
}
-
+
// now lets try set the parent property via calling the adder or the setter method
if (bean != null) {
Tag parent = this;
-
+
while (true) {
parent = parent.getParent();
if (parent == null) {
break;
}
-
+
if (parent instanceof BeanSource) {
BeanSource source = (BeanSource) parent;
Object parentObject = source.getBean();
@@ -157,7 +157,7 @@
}
}
else {
- if (parent == null && var == null) {
+ if (parent == null && var == null) {
//warn if the bean gets lost in space
log.warn( "Could not add bean to parent for bean: " + bean );
}
@@ -177,8 +177,8 @@
beanClass, addMethodName, argTypes
);
}
-
-
+
+
/**
* @return the parent bean object
*/
@@ -188,5 +188,5 @@
return tag.getBean();
}
return null;
- }
+ }
}
1.9 +11 -11 jakarta-commons/jelly/jelly-tags/bean/src/java/org/apache/commons/jelly/tags/bean/BeanPropertyTag.java
Index: BeanPropertyTag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/bean/src/java/org/apache/commons/jelly/tags/bean/BeanPropertyTag.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BeanPropertyTag.java 25 Feb 2004 01:31:53 -0000 1.8
+++ BeanPropertyTag.java 9 Sep 2004 12:06:41 -0000 1.9
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +29,7 @@
* Creates a nested property via calling a beans createFoo() method then
* either calling the setFoo(value) or addFoo(value) methods in a similar way
* to how Ant tags construct themselves.
- *
+ *
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
* @author Christian Sell
* @version $Revision$
@@ -38,24 +38,24 @@
/** empty arguments constant */
private static final Object[] EMPTY_ARGS = {};
-
+
/** empty argument types constant */
private static final Class[] EMPTY_ARG_TYPES = {};
/** the name of the create method */
private String createMethodName;
-
+
public BeanPropertyTag(String tagName) {
super(Object.class, tagName);
if (tagName.length() > 0) {
- createMethodName = "create"
- + tagName.substring(0,1).toUpperCase()
+ createMethodName = "create"
+ + tagName.substring(0,1).toUpperCase()
+ tagName.substring(1);
}
}
-
+
/**
* Creates a new instance by calling a create method on the parent bean
*/
@@ -121,5 +121,5 @@
return MethodUtils.getAccessibleMethod(
theClass, createMethodName, EMPTY_ARG_TYPES
);
- }
+ }
}
1.6 +6 -6 jakarta-commons/jelly/jelly-tags/avalon/src/java/org/apache/commons/jelly/avalon/JellyService.java
Index: JellyService.java
===================================================================
RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/avalon/src/java/org/apache/commons/jelly/avalon/JellyService.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JellyService.java 25 Feb 2004 01:28:22 -0000 1.5
+++ JellyService.java 9 Sep 2004 12:06:41 -0000 1.6
@@ -1,12 +1,12 @@
/*
* Copyright 2002,2004 The Apache Software Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,12 +41,12 @@
* An Avalon based service for executing Jelly scripts. The
* service allows executing a script based on a name as well
* as by a URL.
- *
+ *
* @author <a href="mailto:robert@bull-enterprises.com">Robert McIntosh</a>
* @version 1.1
*/
public interface JellyService {
-
+
/**
* Executes a named script with the supplied
* Map of parameters.
@@ -95,7 +95,7 @@
/**
* Runs a script from the supplied url and sends the output of the script to
* the supplied OutputStream.
- *
+ *
* @param url The URL of the script
* @param params Parameters to be supplied to the script
* @param out The OutputStream to send the output of the script to
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|