Author: gvanmatre
Date: Fri Jul 7 21:21:44 2006
New Revision: 420047
URL: http://svn.apache.org/viewvc?rev=420047&view=rev
Log:
Another batch of checkstyle fixes.
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/LoadBundle.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ConfigBean.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/SymbolBean.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ValidatorBean.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/faces/ClayViewHandler.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/AttributeTokenizer.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ElementBuilder.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextBuilder.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextareaBuilder.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectBooleanCheckboxBuilder.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectItemsBuilder.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/AnchorBuilderRule.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/DirectiveBuilderRule.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/InputBuilderRule.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/SpanBuilderRule.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/ClayTag.java
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/LoadBundle.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/LoadBundle.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/LoadBundle.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/LoadBundle.java
Fri Jul 7 21:21:44 2006
@@ -34,8 +34,8 @@
import org.apache.shale.util.Tags;
/**
- * Component counterpart of the standard loadBundle tag. Since it's a component
- * it can be used with HTML templates.
+ * <p>Component counterpart of the standard loadBundle tag. Since it's a
component
+ * it can be used with HTML templates.</p>
*/
public class LoadBundle extends UIComponentBase {
/**
@@ -49,6 +49,9 @@
*/
private String var = null;
+ /**
+ * @return component family, <code>null</code>
+ */
public String getFamily() {
return null;
}
@@ -62,26 +65,32 @@
/**
- * Sets the base name of the resource bundle to be loaded.
+ * <p>Sets the base name of the resource bundle to be loaded.</p>
+ *
+ * @param basename resource bundle name
*/
public void setBasename(String basename) {
this.basename = basename;
- if ((var != null) && (basename != null))
+ if ((var != null) && (basename != null)) {
loadBundle();
+ }
}
/**
- * Sets the name of a request scope attribute under which the resource
- * bundle will be exposed as a Map.
+ * <p>Sets the name of a request scope attribute under which the resource
+ * bundle will be exposed as a Map.</p>
+ *
+ * @param var session scoped attribute
*/
public void setVar(String var) {
this.var = var;
- if ((var != null) && (basename != null))
+ if ((var != null) && (basename != null)) {
loadBundle();
+ }
}
/**
- * Load the resource bundle and expose it in the request.
+ * <p>Load the resource bundle and expose it in the request.</p>
*/
private void loadBundle() {
// get the current context
@@ -93,8 +102,9 @@
// get the ClassLoader
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
- if (classLoader == null)
+ if (classLoader == null) {
classLoader = getClass().getClassLoader();
+ }
// evaluate any VB expression that we were passed
String resolvedBasename = tagUtils.evalString(basename);
@@ -113,6 +123,11 @@
}
+ /**
+ * <p>Invokes rendering of the component.</p>
+ * @param context faces context
+ * @exception IOException response writer
+ */
public void encodeBegin(FacesContext context) throws IOException {
// ensure that this component is always transient
setTransient(true);
@@ -120,54 +135,90 @@
super.encodeBegin(context);
}
+ /**
+ * <p>Inner class that wrappers a <code>ResourceBundle</code>.</p>
+ */
private static class BundleMap implements Map {
- private ResourceBundle _bundle;
-
- private List _values;
-
+ /**
+ * <p>Wrappered resource bundle.</p>
+ */
+ private ResourceBundle bundle;
+
+ /**
+ * <p>Stores the bundle keys.</p>
+ */
+ private List values;
+
+ /**
+ * @param bundle decorated resource bundle
+ */
public BundleMap(ResourceBundle bundle) {
- _bundle = bundle;
+ this.bundle = bundle;
}
+ /**
+ * @param key bundle resource key
+ * @return bundle string resource value
+ */
public Object get(Object key) {
try {
- return _bundle.getObject(key.toString());
+ return bundle.getObject(key.toString());
} catch (Exception e) {
return "???" + key + "???";
}
}
+ /**
+ * @return <code>true</code> if the bundle is empty
+ */
public boolean isEmpty() {
- return !_bundle.getKeys().hasMoreElements();
+ return !bundle.getKeys().hasMoreElements();
}
+ /**
+ * @param key bundle resource key
+ * @return <code>true</code> if the bundle contains a key
+ */
public boolean containsKey(Object key) {
- return _bundle.getObject(key.toString()) != null;
+ return bundle.getObject(key.toString()) != null;
}
+ /**
+ * @return collection of bundle resource values
+ */
public Collection values() {
- if (_values == null) {
- _values = new ArrayList();
- for (Enumeration enumer = _bundle.getKeys(); enumer
+ if (values == null) {
+ values = new ArrayList();
+ for (Enumeration enumer = bundle.getKeys(); enumer
.hasMoreElements();) {
- String v = _bundle.getString((String)
enumer.nextElement());
- _values.add(v);
+ String v = bundle.getString((String) enumer.nextElement());
+ values.add(v);
}
}
- return _values;
+ return values;
}
+ /**
+ * @return number of keys in the bundle
+ */
public int size() {
return values().size();
}
+ /**
+ * @param value bundle value string
+ * @return <code>true</code> if value is found in the bundle
+ */
public boolean containsValue(Object value) {
return values().contains(value);
}
+ /**
+ * @return set of objects implementing <code>Map.Entry</code>
+ */
public Set entrySet() {
Set set = new HashSet();
- for (Enumeration enumer = _bundle.getKeys(); enumer
+ for (Enumeration enumer = bundle.getKeys(); enumer
.hasMoreElements();) {
final String k = (String) enumer.nextElement();
set.add(new Map.Entry() {
@@ -176,7 +227,7 @@
}
public Object getValue() {
- return _bundle.getObject(k);
+ return bundle.getObject(k);
}
public Object setValue(Object value) {
@@ -189,32 +240,49 @@
return set;
}
+ /**
+ * @return set of resource bundle keys
+ */
public Set keySet() {
Set set = new HashSet();
- for (Enumeration enumer = _bundle.getKeys(); enumer
+ for (Enumeration enumer = bundle.getKeys(); enumer
.hasMoreElements();) {
set.add(enumer.nextElement());
}
return set;
}
- // Unsupported methods
+ /**
+ * @param key unsupported
+ * @return unsupported
+ */
public Object remove(Object key) {
throw new UnsupportedOperationException(this.getClass().getName()
+ " UnsupportedOperationException");
}
+ /**
+ * @param t unsupported
+ */
public void putAll(Map t) {
throw new UnsupportedOperationException(this.getClass().getName()
+ " UnsupportedOperationException");
}
+ /**
+ * @param key unsupported
+ * @param value unsupported
+ * @return unsupported
+ */
public Object put(Object key, Object value) {
throw new UnsupportedOperationException(this.getClass().getName()
+ " UnsupportedOperationException");
}
+ /**
+ * Unsupported <code>Map</code> method.
+ */
public void clear() {
throw new UnsupportedOperationException(this.getClass().getName()
+ " UnsupportedOperationException");
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/component/chain/SequenceGenerator.java
Fri Jul 7 21:21:44 2006
@@ -30,7 +30,7 @@
public class SequenceGenerator {
/**
* <p>Holds the id prefix of "_idsc". The <code>uniqueId</code>
- * is appended for each call to <code>createUniqueId</>.</p>
+ * is appended for each call to <code>createUniqueId</code>.</p>
*/
private StringBuffer buff = new StringBuffer("_idsc");
@@ -45,7 +45,7 @@
* @return a unique id per object instance
*/
public String createUniqueId() {
- buff.setLength(5);
+ buff.setLength("_idsc".length());
buff.append(uniqueId++);
return buff.toString();
}
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ComponentBean.java
Fri Jul 7 21:21:44 2006
@@ -206,7 +206,7 @@
f = Boolean.valueOf(allowBody).booleanValue();
}
} catch (Exception e) {
- f = true;
+ f = true;
}
return f;
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ConfigBean.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ConfigBean.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ConfigBean.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ConfigBean.java
Fri Jul 7 21:21:44 2006
@@ -60,6 +60,7 @@
* using an identifier.
* </p>
*
+ * @param id jsfid of a config bean
* @return config bean
*/
ComponentBean getElement(String id);
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/SymbolBean.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/SymbolBean.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/SymbolBean.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/SymbolBean.java
Fri Jul 7 21:21:44 2006
@@ -30,6 +30,9 @@
public class SymbolBean extends AbstractBean implements Serializable,
Comparable {
+ /**
+ * <p>Unique serialization id.</p>
+ */
private static final long serialVersionUID = -584466364674399355L;
/**
@@ -45,6 +48,8 @@
/**
* <p>Returns a name corresponding to an associated JSF object
property.</p>
+ *
+ * @return symbol name
*/
public String getName() {
return name;
@@ -53,6 +58,8 @@
/**
* <p>Returns the value of the attribute that can be a literal or a
* expression.</p>
+ *
+ * @return symbol value
*/
public String getValue() {
return value;
@@ -60,21 +67,28 @@
/**
* <p>Sets the name of the attribute.</p>
+ *
+ * @param name symbol name
*/
- public void setName(String string) {
- name = string;
+ public void setName(String name) {
+ this.name = name;
}
/**
* <p>Sets the value of the attribute.</p>
+ *
+ * @param value symbol value
*/
- public void setValue(String string) {
- value = string;
+ public void setValue(String value) {
+ this.value = value;
}
/**
* <p>This implementation of the <code>Comparable</code> interface makes
* the <code>name</code> property the compared key.</p>
+ *
+ * @param obj object to compare
+ * @return weighted value that describes this object compared with the obj
*/
public int compareTo(Object obj) {
SymbolBean item = (SymbolBean) obj;
@@ -83,6 +97,9 @@
}
+ /**
+ * @return describes the state of the symbol
+ */
public String toString() {
StringBuffer buff = new StringBuffer();
buff.append("name=\"").append(name).append("\" value=\"").append(value)
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ValidatorBean.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ValidatorBean.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ValidatorBean.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/config/beans/ValidatorBean.java
Fri Jul 7 21:21:44 2006
@@ -15,7 +15,6 @@
*
* $Id$
*/
-
package org.apache.shale.clay.config.beans;
import java.io.Serializable;
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/faces/ClayViewHandler.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/faces/ClayViewHandler.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/faces/ClayViewHandler.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/faces/ClayViewHandler.java
Fri Jul 7 21:21:44 2006
@@ -22,7 +22,6 @@
import java.util.Iterator;
import java.util.Locale;
-import javax.faces.FacesException;
import javax.faces.application.StateManager;
import javax.faces.application.ViewHandler;
import javax.faces.component.UIComponent;
@@ -325,6 +324,7 @@
Class.forName("org.apache.myfaces.application.jsp.JspViewHandlerImpl");
i = 1;
} catch (ClassNotFoundException e) {
+ i = 0;
}
return i;
@@ -348,10 +348,9 @@
* @param context faces context
* @param view root of the component tree
* @exception IOException response writer
- * @exception FacesException generic error
*/
public void renderView(FacesContext context, UIViewRoot view)
- throws IOException, FacesException {
+ throws IOException {
int index = indexOfClayTemplateSuffix(context, view.getViewId());
//is this view a clay html template view
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/AttributeTokenizer.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/AttributeTokenizer.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/AttributeTokenizer.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/AttributeTokenizer.java
Fri Jul 7 21:21:44 2006
@@ -92,6 +92,12 @@
* Overloaded constructor that is passed the complete document and the
* starting and ending offset of the node body within the document.
* </p>
+ *
+ * @param buffer document
+ * @param beginOffset start index of node body in the document
+ * @param endOffset end index of node body in the document
+ * @param lineNumber line number of the node within the document
+ * @param lineBeginOffset index in the document that the line begins
*/
public AttributeTokenizer(StringBuffer buffer, int beginOffset,
int endOffset, int lineNumber, int lineBeginOffset) {
@@ -110,27 +116,49 @@
* </p>
*/
private class TokenOffset implements Token {
+ /**
+ * <p>Starting offset of the token.</p>
+ */
private int beginOffset = 0;
+ /**
+ * <p>Ending offset of the token.</p>
+ */
private int endOffset = 0;
+ /**
+ * @param beginOffset token start index
+ * @param endOffset token end index
+ */
public TokenOffset(int beginOffset, int endOffset) {
this.beginOffset = beginOffset;
this.endOffset = endOffset;
}
+ /**
+ * @return starting offset of the token in the document
+ */
public int getBeginOffset() {
return beginOffset;
}
+ /**
+ * @return ending offset of the token in the document
+ */
public int getEndOffset() {
return endOffset;
}
+ /**
+ * @return parsed document
+ */
public StringBuffer getDocument() {
return buffer;
}
+ /**
+ * @return token text between the beginOffset and endOffset
+ */
public String getRawText() {
String pickel = null;
try {
@@ -142,14 +170,23 @@
return pickel;
}
+ /**
+ * @return line number the token is found on within the document
+ */
public int getLineNumber() {
return lineNumber;
}
+ /**
+ * @return offset within the document that the token line is found
+ */
public int getLineBeginOffset() {
return lineBeginOffset;
}
+ /**
+ * @return description of the token
+ */
public String toString() {
return messages.getMessage("node.token.range",
new Object[] {
@@ -169,8 +206,14 @@
* </p>
*/
private class AttributeEntry implements Map.Entry {
+ /**
+ * <p>Token offset of the attribute key.</p>
+ */
private TokenOffset key = null;
+ /**
+ * <p>Token offset of the attribute value.</p>
+ */
private TokenOffset value = null;
/**
@@ -178,6 +221,9 @@
* Overloaded constructor is passed a [EMAIL PROTECTED] Token} for the
key and
* value attributes.
* </p>
+ *
+ * @param key token key offset
+ * @param value token value offset
*/
public AttributeEntry(TokenOffset key, TokenOffset value) {
this.key = key;
@@ -188,6 +234,8 @@
* <p>
* Returns the attribute name [EMAIL PROTECTED] Token} offset.
* </p>
+ *
+ * @return TokenOffset for the attribute key
*/
public Object getKey() {
return key;
@@ -197,6 +245,8 @@
* <p>
* Returns the attribute value [EMAIL PROTECTED] Token} offset.
* </p>
+ *
+ * @return TokenOffset of the attribute value
*/
public Object getValue() {
return value;
@@ -206,12 +256,18 @@
* <p>
* Sets the attribute value [EMAIL PROTECTED] Token} offset.
* </p>
+ *
+ * @param value TokenOffset value
+ * @return value token offset
*/
public Object setValue(Object value) {
this.value = (TokenOffset) value;
return value;
}
+ /**
+ * @return description of the attribute
+ */
public String toString() {
StringBuffer buff = new StringBuffer();
TokenOffset key = (TokenOffset) getKey();
@@ -239,6 +295,8 @@
* [EMAIL PROTECTED] AttributeTokenizer.AttributeEntry} instances
identifying
* name and value pairs.
* </p>
+ *
+ * @param tokenIndex populated attribute offset of a beging node body
*/
protected synchronized void parse(ArrayList tokenIndex) {
currOffset = beginOffset;
@@ -307,6 +365,12 @@
* Returns the next [EMAIL PROTECTED] Token} given an
<code>startOffset</code> and a
* <code>endDelim</code>.
* </p>
+ *
+ * @param startOffset begining offset in the document
+ * @param endDelim primary token delimiter
+ * @param otherDelim secondary token delimiter
+ * @param isKey looking for an attribute name not a value
+ * @return next token offset
*/
protected TokenOffset nextToken(int startOffset, String endDelim, String
otherDelim, boolean isKey) {
//If isKey is true, we are looking for an attribute name with a
endDelim or otherDelim.
@@ -369,8 +433,14 @@
*/
private class TokenIterator implements Iterator {
+ /**
+ * <p>All the attribute entry tokens in the node body.</p>
+ */
private ArrayList tokenIndex = null;
+ /**
+ * <p>Internal <code>tokenIndex</code> iterator.</p>
+ */
private Iterator ti = null;
/**
@@ -388,6 +458,8 @@
* <p>Retuns <code>true</code> if there are more
* [EMAIL PROTECTED] AttributeTokenizer.AttributeEntry} in the
collection.
* </p>
+ *
+ * @return <code>true</code> if there are more tokens
*/
public boolean hasNext() {
return ti.hasNext();
@@ -397,6 +469,8 @@
* <p>Retuns the next [EMAIL PROTECTED]
AttributeTokenizer.AttributeEntry}
* in the collection.
* </p>
+ *
+ * @return returns the next token
*/
public Object next() {
Map.Entry attribute = (Map.Entry) ti.next();
@@ -418,6 +492,8 @@
* will enumerate attributes in the document where the attributes
* are represented by a [EMAIL PROTECTED]
AttributeTokenizer.AttributeEntry} instance.
* </p>
+ *
+ * @return returns a [EMAIL PROTECTED] AttributeTokenizer.TokenIterator}
iterator.
*/
public Iterator iterator() {
return new TokenIterator();
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ElementBuilder.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ElementBuilder.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ElementBuilder.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/ElementBuilder.java
Fri Jul 7 21:21:44 2006
@@ -55,6 +55,9 @@
/**
* <p>Returns the <code>jsfid</code> from the target HTML
* [EMAIL PROTECTED] org.apache.shale.clay.parser.Node}.</p>
+ *
+ * @param node markup
+ * @return jsfid
*/
protected String getJsfid(Node node) {
String jsfid = (String) node.getAttributes().get("jsfid");
@@ -64,6 +67,9 @@
/**
* <p>Returns the <code>componentType</code> from the target HTML
* [EMAIL PROTECTED] org.apache.shale.clay.parser.Node}.</p>
+ *
+ * @param node markup
+ * @return component type
*/
protected String getComponentType(Node node) {
String componentType = (String)
node.getAttributes().get("componentType");
@@ -74,6 +80,9 @@
* <p>Adds a [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ConverterBean}
* to the <code>target</code> [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ElementBean}
* using the [EMAIL PROTECTED] org.apache.shale.clay.parser.Node} as the
input source.</p>
+ *
+ * @param node markup
+ * @param target child config bean
*/
protected void addConverter(Node node, ElementBean target) {
ConverterBean targetConverter = new ConverterBean();
@@ -93,6 +102,9 @@
* <p>Adds a [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ValidatorBean}
* to the <code>target</code> [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ElementBean}
* using the [EMAIL PROTECTED] org.apache.shale.clay.parser.Node} as the
input source.</p>
+ *
+ * @param node markup
+ * @param target child config bean
*/
protected void addValidator(Node node, ElementBean target) {
ValidatorBean targetValidator = new ValidatorBean();
@@ -111,6 +123,9 @@
* <p>Adds an [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ActionListenerBean}
* to the <code>target</code> [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ElementBean}
* using the [EMAIL PROTECTED] org.apache.shale.clay.parser.Node} as the
input source.</p>
+ *
+ * @param node markup
+ * @param target child config bean
*/
protected void addActionListener(Node node, ElementBean target) {
ActionListenerBean targetActionListener = new ActionListenerBean();
@@ -129,6 +144,9 @@
* <p>Adds a [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ActionListenerBean}
* to the <code>target</code> [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ElementBean}
* using the [EMAIL PROTECTED] org.apache.shale.clay.parser.Node} as the
input source.</p>
+ *
+ * @param node markup
+ * @param target child config bean
*/
protected void addValueChangeListener(Node node, ElementBean target) {
ValueChangeListenerBean targetValueChangeListener = new
ValueChangeListenerBean();
@@ -148,6 +166,9 @@
* [EMAIL PROTECTED] org.apache.shale.clay.config.beans.ComponentBean} and
* and then applies attributes that are optionally nested
* under the <code>node</code>.</p>
+ *
+ * @param node markup
+ * @param target child config bean
*/
protected void realizeComponent(Node node, ComponentBean target) {
// lookup the ConfigBean that handles the id
@@ -186,6 +207,9 @@
* converting them to [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.AttributeBean}'s
* on the <code>target</code> [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ComponentBean}.
* </p>
+ *
+ * @param attributesNode markup
+ * @param target child config bean
*/
protected void addAttributes(Node attributesNode, ComponentBean target) {
Iterator ci = attributesNode.getChildren().iterator();
@@ -217,6 +241,9 @@
* <p>Adds markup <code>symbols</code> to the <code>target</code>
* [EMAIL PROTECTED] org.apache.shale.clay.config.beans.ElementBean}.
* </p>
+ *
+ * @param symbolsNode markup
+ * @param target child config bean
*/
protected void addSymbols(Node symbolsNode, ElementBean target) {
Iterator si = symbolsNode.getChildren().iterator();
@@ -231,8 +258,9 @@
if (name != null && name.length() > 0) {
SymbolBean symbol = new SymbolBean();
StringBuffer tmp = new StringBuffer(name);
- if (tmp.charAt(0) != '@')
+ if (tmp.charAt(0) != '@') {
tmp.insert(0, '@');
+ }
symbol.setName(tmp.toString());
symbol.setValue(value);
@@ -248,6 +276,10 @@
* <p>Handles converting markup resembling the <element> node
* in the clay DTD,
http://struts.apache.org/dtds/shale-clay-config_1_0.dtd,
* to the target [EMAIL PROTECTED]
org.apache.shale.clay.config.beans.ElementBean}.</p>
+ *
+ * @param node markup
+ * @param target child config bean
+ * @param root parent config bean
*/
protected void encodeBegin(Node node, ElementBean target, ComponentBean
root) {
super.encodeBegin(node, target, root);
@@ -283,8 +315,9 @@
}
ci = deleteList.iterator();
- while (ci.hasNext())
+ while (ci.hasNext()) {
node.getChildren().remove(ci.next());
+ }
}
@@ -297,6 +330,9 @@
* super class [EMAIL PROTECTED] Builder} generates a unique id by default.
* The clay namespace HTML nodes can override the renderId to
* allow overridding of nested elements.</p>
+ *
+ * @param node markup
+ * @return config bean
*/
public ElementBean createElement(Node node) {
ElementBean target = super.createElement(node);
@@ -311,8 +347,9 @@
messages.getMessage("parser.unresolved",
new Object[] {node.getToken(),
node.getToken().getRawText()}));
}
- if (id != null)
+ if (id != null) {
target.setRenderId(id.intValue());
+ }
}
return target;
@@ -323,6 +360,8 @@
* This override returns <code>true</code> indicating that the from JSF
* component can have children.
* </p>
+ *
+ * @return <code>true</code>
*/
public boolean isChildrenAllowed() {
return true;
@@ -334,10 +373,13 @@
* This method resolves the <code>jsfid</code> attribute for an HTML
* element to a component definition in the XML configuration files.
* </p>
+ *
+ * @param node markup
+ * @param target child config bean
*/
protected void assignNode(Node node, ElementBean target) {
//the name attribute can not be used here because of the conflict with
- //the param tag.
+ //the param tag.
String id = (String) node.getAttributes().get("id");
target.setId(id);
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextBuilder.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextBuilder.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextBuilder.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextBuilder.java
Fri Jul 7 21:21:44 2006
@@ -38,6 +38,10 @@
* default can be overridden by the "allowBody" attribute in the component
* metadata.
* </p>
+ *
+ * @param node markup
+ * @param target child config bean
+ * @param root parent config bean
*/
protected void encodeEnd(Node node, ElementBean target,
ComponentBean root) {
@@ -47,6 +51,9 @@
* <p>
* Returns the <code>jsfid</code> used to populate the [EMAIL PROTECTED]
ElementBean}.
* </p>
+ *
+ * @param node markup
+ * @return jsfid
*/
protected String getJsfid(Node node) {
return "inputText";
@@ -58,6 +65,9 @@
* <code>javax.faces.HtmlInputTextarea</code> used to define the
* [EMAIL PROTECTED] ElementBean} from the HTML [EMAIL PROTECTED] Node}.
* </p>
+ *
+ * @param node markup
+ * @return component type
*/
protected String getComponentType(Node node) {
return "javax.faces.HtmlInputText";
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextareaBuilder.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextareaBuilder.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextareaBuilder.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/InputTextareaBuilder.java
Fri Jul 7 21:21:44 2006
@@ -18,7 +18,6 @@
package org.apache.shale.clay.parser.builder;
-import org.apache.shale.clay.config.beans.ElementBean;
import org.apache.shale.clay.parser.Node;
/**
@@ -34,6 +33,9 @@
* <p>
* Returns the <code>jsfid</code> used to populate the [EMAIL PROTECTED]
ElementBean}.
* </p>
+ *
+ * @param node markup
+ * @return jsfid
*/
protected String getJsfid(Node node) {
return "inputTextarea";
@@ -45,6 +47,9 @@
* <code>javax.faces.HtmlInputTextarea</code> used to define the
* [EMAIL PROTECTED] ElementBean} from the HTML [EMAIL PROTECTED] Node}.
* </p>
+ *
+ * @param node markup
+ * @return component type
*/
protected String getComponentType(Node node) {
return "javax.faces.HtmlInputTextarea";
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/OutputLinkBuilder.java
Fri Jul 7 21:21:44 2006
@@ -34,6 +34,9 @@
* <p>
* Returns a JSF component type of <code>javax.faces.HtmlOutputLink</code>.
* </p>
+ *
+ * @param node markup
+ * @return component type
*/
protected String getComponentType(Node node) {
return "javax.faces.HtmlOutputLink";
@@ -44,6 +47,9 @@
* Returns a <code>jsfid</code> that will populate the target
* [EMAIL PROTECTED] org.apache.shale.clay.config.beans.ElementBean}.
* </p>
+ *
+ * @param node markup
+ * @return jsfid
*/
protected String getJsfid(Node node) {
return "outputLink";
@@ -54,6 +60,8 @@
* Returns <code>true</code> meaning that the target JSF component can
* have children.
* </p>
+ *
+ * @return <code>true</code>
*/
public boolean isChildrenAllowed() {
return true;
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectBooleanCheckboxBuilder.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectBooleanCheckboxBuilder.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectBooleanCheckboxBuilder.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectBooleanCheckboxBuilder.java
Fri Jul 7 21:21:44 2006
@@ -18,9 +18,7 @@
package org.apache.shale.clay.parser.builder;
-import org.apache.shale.clay.config.beans.ElementBean;
import org.apache.shale.clay.parser.Node;
-import org.apache.shale.clay.parser.builder.chain.InputBuilderRule;
/**
@@ -36,6 +34,9 @@
* <p>
* Returns a <code>jsfid</code> for the [EMAIL PROTECTED] ElementBean}.
* </p>
+ *
+ * @param node markup
+ * @return jsfid
*/
protected String getJsfid(Node node) {
return "selectBooleanCheckbox";
@@ -47,6 +48,9 @@
* <code>javax.faces.HtmlSelectBooleanCheckbox</code> that will create a
* checkbox component.
* </p>
+ *
+ * @param node markup
+ * @return component type
*/
protected String getComponentType(Node node) {
return "javax.faces.HtmlSelectBooleanCheckbox";
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectItemsBuilder.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectItemsBuilder.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectItemsBuilder.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/SelectItemsBuilder.java
Fri Jul 7 21:21:44 2006
@@ -20,7 +20,6 @@
import org.apache.shale.clay.config.beans.ElementBean;
import org.apache.shale.clay.parser.Node;
-import org.apache.shale.clay.parser.builder.chain.OptionBuilderRule;
/**
* <p>
@@ -37,6 +36,7 @@
* [EMAIL PROTECTED] ElementBean}.
* </p>
*
+ * @param node markup
* @return jsfid
*/
protected String getJsfid(Node node) {
@@ -64,6 +64,7 @@
*
* @param node markup
* @param target child bean
+ * @return <code>false</code> if the node body should be ignored
*/
protected boolean getBuildNodeBody(Node node, ElementBean target) {
if (target.getAllowBody() != null) {
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/AnchorBuilderRule.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/AnchorBuilderRule.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/AnchorBuilderRule.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/AnchorBuilderRule.java
Fri Jul 7 21:21:44 2006
@@ -55,6 +55,10 @@
* If the node is an anchored element, return an instance if the builder
and
* stop the chain.
* </p>
+ *
+ * @param context commons chains
+ * @return <code>true</code> if is final
+ * @exception Exception throws back to the top of the chain
*/
public boolean execute(Context context) throws Exception {
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/DirectiveBuilderRule.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/DirectiveBuilderRule.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/DirectiveBuilderRule.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/DirectiveBuilderRule.java
Fri Jul 7 21:21:44 2006
@@ -46,6 +46,10 @@
* only it's children. If the <code>jsfid</code> is "void",
* the element will not be rendered but its children will
* keep their original characteristics.</p>
+ *
+ * @param context commons chains
+ * @return <code>true</code> if the command ends the chain
+ * @exception Exception pushes an exception back to the invoking Command
*/
public boolean execute(Context context) throws Exception {
boolean isFinal = false;
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/InputBuilderRule.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/InputBuilderRule.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/InputBuilderRule.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/InputBuilderRule.java
Fri Jul 7 21:21:44 2006
@@ -83,7 +83,7 @@
builderRuleContext.setBuilder(BUILDERS[2]);
isFinal = true;
} else if (type != null && type.equalsIgnoreCase("submit")) {
- builderRuleContext.setBuilder(BUILDERS[3]);
+ builderRuleContext.setBuilder(BUILDERS[BUILDERS.length - 1]);
isFinal = true;
}
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/SpanBuilderRule.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/SpanBuilderRule.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/SpanBuilderRule.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/parser/builder/chain/SpanBuilderRule.java
Fri Jul 7 21:21:44 2006
@@ -50,7 +50,7 @@
* HTML element.
* </p>
*
- * @param commons chains
+ * @param context commons chains
* @return <code>true</code> if final
* @exception Exception propagated to the top chain
*/
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/ClayTag.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/ClayTag.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/ClayTag.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/ClayTag.java
Fri Jul 7 21:21:44 2006
@@ -23,6 +23,10 @@
import org.apache.shale.clay.component.Clay;
+/**
+ * <p>JSP Tag for the [EMAIL PROTECTED] org.apache.shale.clay.component.Clay}
component.</p>
+ *
+ */
public class ClayTag extends UIComponentBodyTag {
/**
Modified:
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java
URL:
http://svn.apache.org/viewvc/shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java?rev=420047&r1=420046&r2=420047&view=diff
==============================================================================
---
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java
(original)
+++
shale/trunk/shale-clay/src/main/java/org/apache/shale/clay/taglib/SymbolTag.java
Fri Jul 7 21:21:44 2006
@@ -98,7 +98,7 @@
* </p>
*
* @return next transition
- * @exception JspException
+ * @exception JspException general JSP tag
*/
public int doStartTag() throws JspException {
UIComponentTag parentTag =
UIComponentTag.getParentUIComponentTag(pageContext);