Author: rahul
Date: Mon Sep 25 19:30:49 2006
New Revision: 449883
URL: http://svn.apache.org/viewvc?view=rev&rev=449883
Log:
Correct 30-odd checkstyle errors and 1 PMD report. Contains some whitespace
adjustments, but no better place to do them than the sandbox. The remaining
items in these reports are either incorrect or not worth "fixing", IMO.
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/Globals.java
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogContext.java
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogManager.java
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/ShaleDialogELEvaluator.java
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/ConfigurationParser.java
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/DialogMetadata.java
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/Globals.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/Globals.java?view=diff&rev=449883&r1=449882&r2=449883
==============================================================================
---
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/Globals.java
(original)
+++
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/Globals.java
Mon Sep 25 19:30:49 2006
@@ -61,4 +61,3 @@
}
-
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogContext.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogContext.java?view=diff&rev=449883&r1=449882&r2=449883
==============================================================================
---
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogContext.java
(original)
+++
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogContext.java
Mon Sep 25 19:30:49 2006
@@ -39,24 +39,25 @@
/**
* <p>Implementation of [EMAIL PROTECTED] DialogContextManager} for integrating
* Commons SCXML into the Shale Dialog Manager.</p>
- *
- *
+ *
+ *
* @since 1.0.4
*/
final class SCXMLDialogContext implements DialogContext, Serializable {
-
+
// ------------------------------------------------------------
Constructors
/**
* <p>Construct a new instance.</p>
- *
+ *
* @param manager [EMAIL PROTECTED] DialogContextManager} instance that
owns us
* @param dialog The dialog's metadata (whose executable instance needs
* to be created)
- * @param name The dialog's logical name
* @param id Dialog identifier assigned to this instance
+ * @param parentDialogId Dialog identifier assigned to the parent of
+ * this instance
*/
SCXMLDialogContext(DialogContextManager manager, DialogMetadata dialog,
String id,
String parentDialogId) {
@@ -79,7 +80,7 @@
// document describing this dialog
}
-
+
// ------------------------------------------------------ DialogContext
Variables
@@ -132,7 +133,7 @@
* defined for the SCXML document for this dialog.</p>
*/
private SCXMLExecutor executor = null;
-
+
// ----------------------------------------------------- DialogContext
Properties
@@ -222,7 +223,7 @@
/** [EMAIL PROTECTED] */
public void start(FacesContext context) {
-
+
// Construct an appropriate data object for the specified dialog
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null) {
@@ -273,7 +274,7 @@
/** [EMAIL PROTECTED] */
public void stop(FacesContext context) {
-
+
// TODO: Complete (add started flag like legacy impl, here and in
other places)
deactivate();
manager.remove(this);
@@ -299,6 +300,9 @@
/**
* <p>Convention over configuration approach.</p>
+ *
+ * @param viewId The identifier of the view to navigate to.
+ * @param context The current <code>FacesContext</code>
*/
private void navigateTo(String viewId, FacesContext context) {
// TODO: Convention needs to be configurable ;-)
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogManager.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogManager.java?view=diff&rev=449883&r1=449882&r2=449883
==============================================================================
---
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogManager.java
(original)
+++
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/SCXMLDialogManager.java
Mon Sep 25 19:30:49 2006
@@ -37,7 +37,7 @@
/**
* <p>Implementation of [EMAIL PROTECTED] DialogContextManager} for integrating
* Commons SCXML into the Shale Dialog Manager.</p>
- *
+ *
* @since 1.0.4
*/
public final class SCXMLDialogManager implements DialogContextManager,
Serializable {
@@ -154,9 +154,10 @@
* configuration resources will be processed.</p>
*
* @param context FacesContext for the current request
+ * @return Map of [EMAIL PROTECTED] SCXML} instances, keyed by logical
dialog name
*/
private Map dialogs(FacesContext context) {
-
+
// Return the cached instance (if any)
if (this.dialogs != null) {
return this.dialogs;
@@ -275,6 +276,8 @@
/**
* <p>Generate and return a new dialog identifier. FIXME - switch to
* something that creates randomized identifiers?</p>
+ *
+ * @return The generated identifier
*/
private String generateId() {
return "" + ++serial;
@@ -283,6 +286,8 @@
/**
* <p>Return the <code>Log</code> instance for this instance.</p>
+ *
+ * @return The log instance
*/
private Log log() {
if (this.log == null) {
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/ShaleDialogELEvaluator.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/ShaleDialogELEvaluator.java?view=diff&rev=449883&r1=449882&r2=449883
==============================================================================
---
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/ShaleDialogELEvaluator.java
(original)
+++
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/ShaleDialogELEvaluator.java
Mon Sep 25 19:30:49 2006
@@ -1,5 +1,4 @@
/*
- *
* Copyright 2005-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +12,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
package org.apache.shale.dialog2.scxml;
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/ConfigurationParser.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/ConfigurationParser.java?view=diff&rev=449883&r1=449882&r2=449883
==============================================================================
---
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/ConfigurationParser.java
(original)
+++
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/ConfigurationParser.java
Mon Sep 25 19:30:49 2006
@@ -86,6 +86,8 @@
* <p>Return the <code>Map</code> of <code>Dialog</code> instances
* into which parsed information will be stored, keyed by dialog
* name.</p>
+ *
+ * @return Map of SCXML instances, keyed by logical dialog name
*/
public Map getDialogs() {
return this.dialogs;
@@ -112,6 +114,8 @@
/**
* <p>Return the URL of the configuration resource to be parsed.</p>
+ *
+ * @return The resource URL
*/
public URL getResource() {
return this.resource;
@@ -138,6 +142,8 @@
/**
* <p>Return a flag indicating whether we will be doing a validating parse
* or not. Default value is <code>false</code>.</p>
+ *
+ * @return Whether the parse is validating
*/
public boolean isValidating() {
return this.validating;
@@ -188,6 +194,8 @@
/**
* <p>Return a fully configured <code>Digester</code> instance.</p>
+ *
+ * @return The configuration parser Digester instance
*/
private Digester digester() {
@@ -209,9 +217,13 @@
/**
- * <p>Parse an individual SCXML document, storing resulting information
- * as an entry in the <code>Map</code> specified by the
<code>dialogs</code>
- * property.</p>
+ * <p>Parse the SCXML documents in the dialog metadata, storing resulting
+ * information as an entry in the <code>Map</code> specified by the
+ * <code>dialogs</code> property.</p>
+ *
+ * @param metadata The metadata map
+ * @throws IOException if an input/output error occurs
+ * @throws SAXException if an XML parsing error occurs
*/
private void parseDialogs(Map metadata) throws IOException, SAXException {
@@ -223,7 +235,6 @@
String name = (String) entry.getKey();
DialogMetadata dMetadata = (DialogMetadata) entry.getValue();
String scxmlconfig = dMetadata.getConfig();
- String dataclassname = dMetadata.getDataclassname();
// TODO - Relative URL testing
URL resource = new URL(getResource(), scxmlconfig);
@@ -261,6 +272,8 @@
}
/**
+ * [EMAIL PROTECTED]
+ *
* @see Rule#begin(String, String, Attributes)
*/
public final void begin(final String namespace, final String qname,
Modified:
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/DialogMetadata.java
URL:
http://svn.apache.org/viewvc/shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/DialogMetadata.java?view=diff&rev=449883&r1=449882&r2=449883
==============================================================================
---
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/DialogMetadata.java
(original)
+++
shale/sandbox/shale-dialog2-scxml/src/main/java/org/apache/shale/dialog2/scxml/config/DialogMetadata.java
Mon Sep 25 19:30:49 2006
@@ -1,5 +1,4 @@
/*
- *
* Copyright 2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +12,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
package org.apache.shale.dialog2.scxml.config;
@@ -75,10 +73,10 @@
* @param config The location where the SCXML document for this dialog
resides
* @param dataClassName The FQCN of the dialog data
*/
- DialogMetadata(String name, String config, String dataclassname) {
+ DialogMetadata(String name, String config, String dataClassName) {
this.name = name;
this.config = config;
- this.dataClassName = dataclassname;
+ this.dataClassName = dataClassName;
}