- Revision
- 554
- Author
- mward
- Date
- 2008-01-16 22:10:44 -0600 (Wed, 16 Jan 2008)
Log Message
javadoc: added documentation for classes under the registrar package
Modified Paths
- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractReference.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractRubyAwareRegistrar.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ComponentReference.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Reference.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestAttributeReference.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestParameterReference.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RubyAwareRegistrar.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ServletContextAttributeReference.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/SessionAttributeReference.java
Diff
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java 2008-01-17 04:10:44 UTC (rev 554) @@ -13,6 +13,8 @@ /** * Not to be confused with the [EMAIL PROTECTED] ValueConverter} this interface is used to simplify converting (transmuting) a * String value into a given type. + * + * @author Michael Ward */ public interface StringTransmuter {
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractReference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractReference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractReference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,6 +10,11 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Simple abstract implementation which manages the associated <i>key</i>. + * + * @author Michael Ward + */ public abstract class AbstractReference implements Reference { private Object key;
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractRubyAwareRegistrar.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractRubyAwareRegistrar.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/AbstractRubyAwareRegistrar.java 2008-01-17 04:10:44 UTC (rev 554) @@ -1,6 +1,20 @@ +/***************************************************************************** + * Copyright (C) 2005,2006 Michael Ward * + * All rights reserved. * + * ------------------------------------------------------------------------- * + * The software in this package is published under the terms of the BSD * + * style license a copy of which has been included with this distribution in * + * the LICENSE.txt file. * + * * + * Original code by: Michael Ward * + *****************************************************************************/ package org.codehaus.waffle.registrar; - +/** + * A Registrar that provides registration methods for Ruby scripts. + * + * @author Michael Ward + */ public abstract class AbstractRubyAwareRegistrar extends AbstractRegistrar implements RubyAwareRegistrar { private final RubyAwareRegistrar rubyAwareRegistrar;
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ComponentReference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ComponentReference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ComponentReference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,8 +10,17 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Allows for a component dependency to be resolved from another component registered with Waffle. This allows more + * than one implementation to be registered with Waffle without causing ambiguity issues. + * + * @author Michael Ward + */ public class ComponentReference extends AbstractReference { + /** + * @param key is the key the dependent component was registered under (usually a [EMAIL PROTECTED] String} or [EMAIL PROTECTED] Class}) + */ public ComponentReference(Object key) { super(key); } @@ -19,6 +28,8 @@ /** * This method can be statically imported into an Application's Registrar allowing * for a more fluent interface to define components and their dependencies + * + * @param key is the key the dependent component was registered under (usually a [EMAIL PROTECTED] String} or [EMAIL PROTECTED] Class}) */ public static ComponentReference component(Object key) { return new ComponentReference(key);
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Reference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Reference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Reference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,8 +10,19 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Implementation of this interface can be used from within a [EMAIL PROTECTED] Registrar} to define how a components dependencies + * can be resolved more explicitly. + * + * @author Michael Ward + */ public interface Reference { + /** + * A key is used to indicate what is being referenced. + * + * @return the key pointing to the referenced item. + */ Object getKey(); }
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java 2008-01-17 04:10:44 UTC (rev 554) @@ -44,6 +44,7 @@ /** * @param type represent both the key and type the object will be registered under * @param parameters any parameters needed to satisfy the component being registered + * @return The current Registrar which allows for chaining registration calls. */ Registrar register(Class<?> type, Object... parameters); @@ -51,6 +52,7 @@ * @param key represent the key the object will be registered under * @param type represent the component type * @param parameters any parameters needed to satisfy the component being registered + * @return The current Registrar which allows for chaining registration calls. */ Registrar register(Object key, Class<?> type, Object... parameters);
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestAttributeReference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestAttributeReference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestAttributeReference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,8 +10,16 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Allows for a component dependency to be resolved from a [EMAIL PROTECTED] ServletRequest} attribute. + * + * @author Michael Ward + */ public class RequestAttributeReference extends AbstractReference { - + + /** + * @param key is the <code>String</code> specifying the name of the request attribute. + */ public RequestAttributeReference(String key) { super(key); } @@ -19,6 +27,8 @@ /** * This method can be statically imported into an Application's Registrar allowing * for a more fluent interface to define components and their dependencies + * + * @param key is the <code>String</code> specifying the name of the request attribute. */ public static RequestAttributeReference requestAttribute(String key) { return new RequestAttributeReference(key);
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestParameterReference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestParameterReference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RequestParameterReference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,19 +10,36 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Allows for a component dependency to be resolved from a [EMAIL PROTECTED] ServletRequest} parameter. + * + * @author Michael Ward + */ public class RequestParameterReference extends AbstractReference { private final Object defaultValue; + /** + * @param key is the <code>String</code> specifying the name of the request parameter. + */ public RequestParameterReference(String key) { super(key); defaultValue = null; } + /** + * @param key is the <code>String</code> specifying the name of the request parameter. + * @param defaultValue the default value to use if the parameter is not found, primitives types should NOT set a + * default value since the standard default value will be returned (e.g. int => 0, double => 0.0) + */ public RequestParameterReference(String key, Object defaultValue) { super(key); this.defaultValue = defaultValue; } + /** + * @return the default value to use if the parameter is not found, primitives types should NOT set a + * default value since the standard default value will be returned (e.g. int => 0, double => 0.0) + */ public Object getDefaultValue() { return defaultValue; } @@ -30,6 +47,8 @@ /** * This method can be statically imported into an Application's Registrar allowing * for a more fluent interface to define components and their dependencies + * + * @param key is the <code>String</code> specifying the name of the request parameter. */ public static RequestParameterReference requestParameter(String key) { return new RequestParameterReference(key); @@ -39,7 +58,7 @@ * This method can be statically imported into an Application's Registrar allowing * for a more fluent interface to define components and their dependencies * - * @param key the parameter name to resolve against + * @param key is the <code>String</code> specifying the name of the request parameter. * @param defaultValue the default value to use if the parameter is not found, primitives types should NOT set a * default value since the standard default value will be returned (e.g. int => 0, double => 0.0) */
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RubyAwareRegistrar.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RubyAwareRegistrar.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/RubyAwareRegistrar.java 2008-01-17 04:10:44 UTC (rev 554) @@ -1,7 +1,28 @@ +/***************************************************************************** + * Copyright (C) 2005,2006 Michael Ward * + * All rights reserved. * + * ------------------------------------------------------------------------- * + * The software in this package is published under the terms of the BSD * + * style license a copy of which has been included with this distribution in * + * the LICENSE.txt file. * + * * + * Original code by: Michael Ward * + *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Implementations of this interface will allow for Ruby scripts to be registred with Waffle. + * + * @author Michael Ward + */ public interface RubyAwareRegistrar { + /** + * Register a ruby script with Waffle + * + * @param key the name this script should be registred under + * @param className represent the name of the Ruby class being registred + */ void registerRubyScript(String key, String className); }
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ServletContextAttributeReference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ServletContextAttributeReference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/ServletContextAttributeReference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,8 +10,16 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Allows for a component dependency to be resolved from a [EMAIL PROTECTED] ServletContext} attribute. + * + * @author Michael Ward + */ public class ServletContextAttributeReference extends AbstractReference { - + + /** + * @param key is the <code>String</code> specifying the name of the [EMAIL PROTECTED] ServletContext} attribute. + */ public ServletContextAttributeReference(String key) { super(key); } @@ -19,6 +27,8 @@ /** * This method can be statically imported into an Application's Registrar allowing * for a more fluent interface to define components and their dependencies + * + * @param key is the <code>String</code> specifying the name of the [EMAIL PROTECTED] ServletContext} attribute. */ public static ServletContextAttributeReference servletContextAttribute(String key) { return new ServletContextAttributeReference(key);
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/SessionAttributeReference.java (553 => 554)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/SessionAttributeReference.java 2008-01-17 02:56:03 UTC (rev 553) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/SessionAttributeReference.java 2008-01-17 04:10:44 UTC (rev 554) @@ -10,8 +10,16 @@ *****************************************************************************/ package org.codehaus.waffle.registrar; +/** + * Allows for a component dependency to be resolved from a [EMAIL PROTECTED] HttpSession} attribute. + * + * @author Michael Ward + */ public class SessionAttributeReference extends AbstractReference { - + + /** + * @param key is the <code>String</code> specifying the name of the [EMAIL PROTECTED] HttpSession} attribute. + */ public SessionAttributeReference(String key) { super(key); } @@ -19,6 +27,8 @@ /** * This method can be statically imported into an Application's Registrar allowing * for a more fluent interface to define components and their dependencies + * + * @param key is the <code>String</code> specifying the name of the [EMAIL PROTECTED] HttpSession} attribute. */ public static SessionAttributeReference sessionAttribute(String key) { return new SessionAttributeReference(key);
To unsubscribe from this list please visit:
