You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by ra...@apache.org on 2006/09/27 02:54:34 UTC
svn commit: r450270 - in
/shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2:
Constants.java DialogContext.java DialogContextManager.java
faces/Dialog2NavigationHandler.java faces/Dialog2PhaseListener.java
Author: rahul
Date: Tue Sep 26 17:54:33 2006
New Revision: 450270
URL: http://svn.apache.org/viewvc?view=rev&rev=450270
Log:
Unused imports, Javadoc warnings, checkstyle reports. Cosmetic changes only.
Modified:
shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/Constants.java
shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContext.java
shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContextManager.java
shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2NavigationHandler.java
shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2PhaseListener.java
Modified: shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/Constants.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/Constants.java?view=diff&rev=450270&r1=450269&r2=450270
==============================================================================
--- shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/Constants.java (original)
+++ shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/Constants.java Tue Sep 26 17:54:33 2006
@@ -87,4 +87,4 @@
"org.apache.shale.dialog2.PARENT_ID";
-}
\ No newline at end of file
+}
Modified: shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContext.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContext.java?view=diff&rev=450270&r1=450269&r2=450270
==============================================================================
--- shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContext.java (original)
+++ shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContext.java Tue Sep 26 17:54:33 2006
@@ -23,10 +23,10 @@
* context instance. If successful, it is likely that this
* interface would be defined in the <code>org.apache.shale.dialog</code>
* package.</p>
- *
+ *
* <p><strong>IMPLEMENTATION NOTE</strong> - Implementations of this interface
* will be stored in session scope, so they should be serializable.</p>
- *
+ *
* @since 1.0.4
*/
public interface DialogContext {
@@ -38,6 +38,8 @@
/**
* <p>Return <code>true</code> if this {@link DialogContext} is currently
* active (created but not yet removed).</p>
+ *
+ * @return Whether this dialog instance is active
*/
public boolean isActive();
@@ -45,6 +47,8 @@
/**
* <p>Return the generic data object representing model state for this
* dialog instance.</p>
+ *
+ * @return The data object for this dialog instance
*/
public Object getData();
@@ -61,12 +65,18 @@
/**
* <p>Return the context identifier for this instance of the specified
* dialog.</p>
+ *
+ * @return The identifier for this dialog instance, unique for
+ * the manager associated with this dialog instance
*/
public String getId();
/**
* <p>Return the logical name of the dialog being executed by this instance.<?p>
+ *
+ * @return The logical name of the dialog which this {@link DialogContext}
+ * is an instance of
*/
public String getName();
@@ -77,6 +87,7 @@
*
* @exception IllegalStateException if a parent {@link DialogContext} initially
* associated with this {@link DialogContext} is no longer available
+ * @return The parent {@link DialogContext}, may be null
*/
public DialogContext getParent();
Modified: shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContextManager.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContextManager.java?view=diff&rev=450270&r1=450269&r2=450270
==============================================================================
--- shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContextManager.java (original)
+++ shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/DialogContextManager.java Tue Sep 26 17:54:33 2006
@@ -21,14 +21,14 @@
/**
* <p>Management functions for the {@link DialogContext} instances related
* to a particular user's session.</p>
- *
+ *
* <p><strong>IMPLEMENTATION NOTE</strong> - Implementations of this interface
* will be stored in session scope, so they should be serializable.</p>
- *
+ *
* @since 1.0.4
*/
public interface DialogContextManager {
-
+
/**
* <p>Create a new instance of the specified dialog configuration, returning
@@ -37,9 +37,11 @@
* instances for the current user. The instance must also have been stored
* as a request scope attribute under key <code>Constants.INSTANCE_BEAN</code>.
* The new instance will not be associated with any parent instance.</p>
- *
+ *
* @param context FacesContext for the current request
* @param name Logical name of the dialog to be created
+ * @return The newly created {@link DialogContext} instance, with no
+ * parent dialog association
*
* @exception IllegalArgumentException if no dialog definition
* can be found for the specified logical name
@@ -71,6 +73,7 @@
* @param name Logical name of the dialog to be executed
* @param parent Parent DialogContext with which the new instance
* will be assocated (if any)
+ * @return The newly created "child" {@link DialogContext} instance
*
* @exception IllegalArgumentException if no dialog definition
* can be found for the specified logical name
@@ -84,8 +87,10 @@
/**
* <p>Return the {@link DialogContext} instance for the specified identifier
* (if any); otherwise, return <code>null</code>.</p>
- *
+ *
* @param id Dialog identifier for which to return an instance
+ * @return The {@link DialogContext} instance for this identifier,
+ * may be null
*/
public DialogContext get(String id);
@@ -93,8 +98,7 @@
/**
* <p>Remove the specified {@link DialogContext} instance from the set of
* active instances for the current user.</p>
- *
- *
+ *
* @param instance {@link DialogContext} instance to be removed
*/
public void remove(DialogContext instance);
Modified: shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2NavigationHandler.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2NavigationHandler.java?view=diff&rev=450270&r1=450269&r2=450270
==============================================================================
--- shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2NavigationHandler.java (original)
+++ shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2NavigationHandler.java Tue Sep 26 17:54:33 2006
@@ -17,9 +17,8 @@
package org.apache.shale.dialog2.faces;
import javax.faces.application.NavigationHandler;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.shale.dialog2.Constants;
@@ -53,7 +52,7 @@
}
this.original = original;
}
-
+
// ------------------------------------------------- DialogContext Variables
@@ -84,15 +83,15 @@
* by <code>Constants.DIALOG_PREFIX</code>, create and start
* a new {@link DialogContext} instance for a logical name
* based on the remainder of the logical outcome after the
- * prefix.</p>
+ * prefix.</li>
* <li>Otherwise, delegate control to the original navigation
* handler passed to our constructor.</li>
* </ul></li>
* <li>If this view is currently executing a {@link DialogContext}
* instance, advance its progress based on the specified logical
- * outcome.</p>
+ * outcome.</li>
* </ul>
- *
+ *
* @param context FacesContext for the current request
* @param fromAction Action that was invoked
* @param outcome Logical outcome from the invoked action
Modified: shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2PhaseListener.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2PhaseListener.java?view=diff&rev=450270&r1=450269&r2=450270
==============================================================================
--- shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2PhaseListener.java (original)
+++ shale/sandbox/shale-dialog2/src/main/java/org/apache/shale/dialog2/faces/Dialog2PhaseListener.java Tue Sep 26 17:54:33 2006
@@ -17,12 +17,12 @@
package org.apache.shale.dialog2.faces;
import java.util.Map;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
+
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.shale.dialog2.Constants;
@@ -39,7 +39,7 @@
* @since 1.0.4
*/
public final class Dialog2PhaseListener implements PhaseListener {
-
+
// ------------------------------------------------------------ Constructors
@@ -52,7 +52,7 @@
log.info("Instantiating Dialog2PhaseListener()");
}
}
-
+
// ------------------------------------------------------ Instance Variables
@@ -68,6 +68,8 @@
/**
* <p>Return the phase identifier we are interested in.</p>
+ *
+ * @return The phase identifier of interest
*/
public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;
@@ -80,7 +82,7 @@
* {@link DialogContext}. If this view is not currently executing
* a {@link DialogContext} instance, optionally create a new
* instance based o the presence of request parameters.</p>
- *
+ *
* @param event The phase event to be processed
*/
public void afterPhase(PhaseEvent event) {
@@ -199,7 +201,7 @@
}
}
-
+
}
@@ -211,6 +213,7 @@
* @param context FacesContext for the current request
* @param dialogName Logical name of the dialog to be created
* @param parentId Parent dialog context instance (if any)
+ * @return The newly created {@link DialogContext}, may be null
*/
private DialogContext create(FacesContext context, String dialogName,
String parentId) {