Title: [waffle-scm] [545] trunk/waffle-core/src/main/java/org/codehaus/waffle: javadoc: updated documentation

Diff

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/ComponentRegistry.java (544 => 545)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/ComponentRegistry.java	2008-01-08 14:53:37 UTC (rev 544)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/ComponentRegistry.java	2008-01-09 13:53:02 UTC (rev 545)
@@ -38,14 +38,27 @@
 import org.codehaus.waffle.view.ViewResolver;
 
 /**
- * Component registry which allows Waffle to have a pluggable architecture.
+ * <p>Responsible for maintaining Waffle framework components, which allows Waffle to have a pluggable architecture.</p>
  *
  * @author Michael Ward
  * @author Mauro Talevi
  */
 public interface ComponentRegistry {
+
+    /**
+     * Retrieve a component via the key it was registered under
+     *
+     * @param key the key the component was registered under
+     * @return the component registered
+     */
     <T> T locateByKey(Object key);
 
+    /**
+     * Retrieve a component by type.  Be cautious of making ambiguous requests.
+     *
+     * @param t the type of the component requested
+     * @return the component registered
+     */
     <T> T locateByType(Class<T> t);
 
     ActionMethodExecutor getActionMethodExecutor();

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/Startable.java (544 => 545)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/Startable.java	2008-01-08 14:53:37 UTC (rev 544)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/Startable.java	2008-01-09 13:53:02 UTC (rev 545)
@@ -10,10 +10,25 @@
  *****************************************************************************/
 package org.codehaus.waffle;
 
+/**
+ * <p>Implementors of this interface will be notified of lifecycle events (Start and Stop)
+ * as it relates to the context they have been registered with in the application's Registrar.
+ * </p>
+ *
+ * @see org.codehaus.waffle.registrar.Registrar#application()
+ * @see org.codehaus.waffle.registrar.Registrar#session()
+ * @see org.codehaus.waffle.registrar.Registrar#request() 
+ */
 public interface Startable {
 
+    /**
+     * Start this component.  This is executed when the context (Application, Session or Request) is initialized. 
+     */
     public void start();
 
+    /**
+     * Stop this component.  This is executed when the context (Application, Session or Request) is destroyed.
+     */
     public void stop();
     
 }

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/WaffleException.java (544 => 545)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/WaffleException.java	2008-01-08 14:53:37 UTC (rev 544)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/WaffleException.java	2008-01-09 13:53:02 UTC (rev 545)
@@ -11,7 +11,7 @@
 package org.codehaus.waffle;
 
 /**
- * Basic Exception type in the Waffle framework.
+ * <p>The Base Exception type in the Waffle framework.</p>
  *
  * @author Michael Ward
  */

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/action/annotation/ActionMethod.java (544 => 545)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/action/annotation/ActionMethod.java	2008-01-08 14:53:37 UTC (rev 544)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/action/annotation/ActionMethod.java	2008-01-09 13:53:02 UTC (rev 545)
@@ -16,7 +16,9 @@
 import java.lang.annotation.Target;
 
 /**
- * Annotation to control action method properties. 
+ * <p>This annotation identifies a method as being an Action Method.
+ * See [EMAIL PROTECTED] org.codehaus.waffle.action.intercept.SecurityMethodInterceptor} to protect your application
+ * from potential security risk (e.g. hackers).</p>
  * 
  * @author Mauro Talevi
  * @author Michael Ward
@@ -25,5 +27,11 @@
 @Retention(RetentionPolicy.RUNTIME)
 public @interface ActionMethod {
     String[] parameters() default {};
+
+    /**
+     * When set signal that the annotated method should be invoked when no other ActionMethod was requested.
+     *
+     * @return true if the annotated method should be <i>default</i>.
+     */
     boolean asDefault() default false;
 }

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java (544 => 545)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java	2008-01-08 14:53:37 UTC (rev 544)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/registrar/Registrar.java	2008-01-09 13:53:02 UTC (rev 545)
@@ -11,7 +11,9 @@
 package org.codehaus.waffle.registrar;
 
 /**
- * Defines the available methods for registering Controllers and Components.
+ * <p>Defines the available methods for registering Controllers and Components.
+ * By default Constructor based dependency injection is utilized.
+ * </p>
  *
  * @author Michael Ward
  * @author Mauro Talevi
@@ -52,18 +54,48 @@
      */
     Registrar register(Object key, Class<?> type, Object... parameters);
 
+    /**
+     * Register an instance directly with the current context.
+     *
+     * @param instance to be registered
+     * @return The current Registrar which allows for chaining registration calls.
+     */
     Registrar registerInstance(Object instance);
 
+    /**
+     * Register an instance directly with the current context under the given key.
+     *
+     * @param key the key the instance is to be registered under
+     * @param instance to be registered
+     * @return The current Registrar which allows for chaining registration calls.
+     */
     Registrar registerInstance(Object key, Object instance);
 
     Registrar registerNonCaching(Class<?> type, Object... parameters);
 
     Registrar registerNonCaching(Object key, Class<?> type, Object... parameters);
 
+    /**
+     * Components registered in this method will be availables for the life of the Application.
+     *
+     * @see org.codehaus.waffle.context.ContextLevel#APPLICATION
+     * @see javax.servlet.ServletContextListener
+     */
     void application();
 
+    /**
+     * Components registered in this method will be availables for the life of a Users session.
+     *
+     * @see org.codehaus.waffle.context.ContextLevel#SESSION
+     * @see javax.servlet.http.HttpSessionListener
+     */
     void session();
 
+    /**
+     * Components registered in this method will be availables for the life of a request.
+     *
+     * @see org.codehaus.waffle.context.ContextLevel#REQUEST
+     */
     void request();
     
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to