You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/05/05 18:21:09 UTC

svn commit: r400102 [2/5] - in /tapestry/tapestry4/trunk: .settings/ examples/VlibBeans/src/java/org/apache/tapestry/vlib/ejb/ examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/ examples/Workbench/src/java/org/apache/tapestry/work...

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java Fri May  5 09:20:58 2006
@@ -27,12 +27,10 @@
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.service.ThreadLocale;
 import org.apache.hivemind.util.ContextResource;
-import org.apache.tapestry.AbstractComponent;
 import org.apache.tapestry.BaseComponent;
 import org.apache.tapestry.IAsset;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IComponent;
-import org.apache.tapestry.IEngine;
 import org.apache.tapestry.INamespace;
 import org.apache.tapestry.IPage;
 import org.apache.tapestry.IRequestCycle;
@@ -40,10 +38,8 @@
 import org.apache.tapestry.TapestryConstants;
 import org.apache.tapestry.asset.AssetSource;
 import org.apache.tapestry.binding.BindingSource;
-import org.apache.tapestry.binding.ExpressionBinding;
 import org.apache.tapestry.coerce.ValueConverter;
 import org.apache.tapestry.engine.IPageLoader;
-import org.apache.tapestry.event.ChangeObserver;
 import org.apache.tapestry.resolver.ComponentSpecificationResolver;
 import org.apache.tapestry.services.ComponentConstructor;
 import org.apache.tapestry.services.ComponentConstructorFactory;
@@ -59,16 +55,18 @@
 import org.apache.tapestry.web.WebContextResource;
 
 /**
- * Implementation of tapestry.page.PageLoader. Runs the process of building the component hierarchy
- * for an entire page.
+ * Implementation of tapestry.page.PageLoader. Runs the process of building the
+ * component hierarchy for an entire page.
  * <p>
- * This implementation is not threadsafe, therefore the pooled service model must be used.
+ * This implementation is not threadsafe, therefore the pooled service model
+ * must be used.
  * 
  * @author Howard Lewis Ship
  */
 
 public class PageLoader implements IPageLoader
 {
+
     private Log _log;
 
     /** @since 4.0 */
@@ -113,8 +111,9 @@
     private ComponentClassProvider _pageClassProvider;
 
     /**
-     * Used to find the correct Java component class for a component (a similar process to resolving
-     * a page, but with slightly differen steps and defaults).
+     * Used to find the correct Java component class for a component (a similar
+     * process to resolving a page, but with slightly differen steps and
+     * defaults).
      * 
      * @since 4.0
      */
@@ -138,7 +137,8 @@
     private ThreadLocale _threadLocale;
 
     /**
-     * The locale of the application, which is also the locale of the page being loaded.
+     * The locale of the application, which is also the locale of the page being
+     * loaded.
      */
 
     private Locale _locale;
@@ -150,7 +150,8 @@
     private int _count;
 
     /**
-     * The recursion depth. A page with no components is zero. A component on a page is one.
+     * The recursion depth. A page with no components is zero. A component on a
+     * page is one.
      */
 
     private int _depth;
@@ -172,22 +173,23 @@
         // complete
         IComponentVisitor verifyRequiredParametersVisitor = new VerifyRequiredParametersVisitor();
 
-        _verifyRequiredParametersWalker = new ComponentTreeWalker(new IComponentVisitor[]
-        { verifyRequiredParametersVisitor });
+        _verifyRequiredParametersWalker = new ComponentTreeWalker(
+                new IComponentVisitor[] { verifyRequiredParametersVisitor });
 
-        _establishDefaultParameterValuesWalker = new ComponentTreeWalker(new IComponentVisitor[]
-        { _establishDefaultParameterValuesVisitor });
+        _establishDefaultParameterValuesWalker = new ComponentTreeWalker(
+                new IComponentVisitor[] { _establishDefaultParameterValuesVisitor });
     }
 
     /**
-     * Binds properties of the component as defined by the container's specification.
+     * Binds properties of the component as defined by the container's
+     * specification.
      * <p>
-     * This implementation is very simple, we will need a lot more sanity checking and eror checking
-     * in the final version.
+     * This implementation is very simple, we will need a lot more sanity
+     * checking and eror checking in the final version.
      * 
      * @param container
-     *            The containing component. For a dynamic binding ({@link ExpressionBinding}) the
-     *            property name is evaluated with the container as the root.
+     *            The containing component. For a dynamic binding ({@link ExpressionBinding})
+     *            the property name is evaluated with the container as the root.
      * @param component
      *            The contained component being bound.
      * @param spec
@@ -197,8 +199,8 @@
      *            {@link IComponentSpecification}).
      */
 
-    void bind(IComponent container, IComponent component, IContainedComponent contained,
-            String defaultBindingPrefix)
+    void bind(IComponent container, IComponent component,
+            IContainedComponent contained, String defaultBindingPrefix)
     {
         IComponentSpecification spec = component.getSpecification();
         boolean formalOnly = !spec.getAllowInformalParameters();
@@ -207,23 +209,26 @@
         {
             if (formalOnly)
                 throw new ApplicationRuntimeException(PageloadMessages
-                        .inheritInformalInvalidComponentFormalOnly(component), component, contained
-                        .getLocation(), null);
+                        .inheritInformalInvalidComponentFormalOnly(component),
+                        component, contained.getLocation(), null);
 
-            IComponentSpecification containerSpec = container.getSpecification();
+            IComponentSpecification containerSpec = container
+                    .getSpecification();
 
             if (!containerSpec.getAllowInformalParameters())
                 throw new ApplicationRuntimeException(PageloadMessages
-                        .inheritInformalInvalidContainerFormalOnly(container, component),
-                        component, contained.getLocation(), null);
+                        .inheritInformalInvalidContainerFormalOnly(container,
+                                component), component, contained.getLocation(),
+                        null);
 
-            IQueuedInheritedBinding queued = new QueuedInheritInformalBindings(component);
+            IQueuedInheritedBinding queued = new QueuedInheritInformalBindings(
+                    component);
             _inheritedBindingQueue.add(queued);
         }
 
         Iterator i = contained.getBindingNames().iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
             String name = (String) i.next();
 
@@ -240,31 +245,25 @@
             // a formal parameter.
 
             if (formalOnly && !isFormal)
-                throw new ApplicationRuntimeException(PageloadMessages.formalParametersOnly(
-                        component,
-                        name), component, bspec.getLocation(), null);
+                throw new ApplicationRuntimeException(PageloadMessages
+                        .formalParametersOnly(component, name), component,
+                        bspec.getLocation(), null);
 
             // If an informal parameter that conflicts with a reserved name,
             // then skip it.
 
-            if (!isFormal && spec.isReservedParameterName(name))
-                continue;
+            if (!isFormal && spec.isReservedParameterName(name)) continue;
 
             if (isFormal)
             {
                 if (!name.equals(parameterName))
                 {
-                    _log.warn(PageloadMessages.usedParameterAlias(
-                            contained,
-                            name,
-                            parameterName,
-                            bspec.getLocation()));
+                    _log.warn(PageloadMessages.usedParameterAlias(contained,
+                            name, parameterName, bspec.getLocation()));
                 }
                 else if (pspec.isDeprecated())
-                    _log.warn(PageloadMessages.deprecatedParameter(
-                            name,
-                            bspec.getLocation(),
-                            contained.getType()));
+                    _log.warn(PageloadMessages.deprecatedParameter(name, bspec
+                            .getLocation(), contained.getType()));
             }
 
             // The type determines how to interpret the value:
@@ -278,34 +277,39 @@
 
             // For inherited bindings, defer until later. This gives components
             // a chance to setup bindings from static values and expressions in
-            // the template. The order of operations is tricky, template bindings
-            // come later. Note that this is a hold over from the Tapestry 3.0 DTD
+            // the template. The order of operations is tricky, template
+            // bindings
+            // come later. Note that this is a hold over from the Tapestry 3.0
+            // DTD
             // and will some day no longer be supported.
 
             if (type == BindingType.INHERITED)
             {
-                QueuedInheritedBinding queued = new QueuedInheritedBinding(component, bspec
-                        .getValue(), parameterName);
+                QueuedInheritedBinding queued = new QueuedInheritedBinding(
+                        component, bspec.getValue(), parameterName);
                 _inheritedBindingQueue.add(queued);
                 continue;
             }
 
             String description = PageloadMessages.parameterName(name);
 
-            IBinding binding = convert(container, description, defaultBindingPrefix, bspec);
+            IBinding binding = convert(container, description,
+                    defaultBindingPrefix, bspec);
 
             addBindingToComponent(component, parameterName, binding);
         }
     }
 
     /**
-     * Adds a binding to the component, checking to see if there's a name conflict (an existing
-     * binding for the same parameter ... possibly because parameter names can be aliased).
+     * Adds a binding to the component, checking to see if there's a name
+     * conflict (an existing binding for the same parameter ... possibly because
+     * parameter names can be aliased).
      * 
      * @param component
      *            to which the binding should be added
      * @param parameterName
-     *            the name of the parameter to bind, which should be a true name, not an alias
+     *            the name of the parameter to bind, which should be a true
+     *            name, not an alias
      * @param binding
      *            the binding to add
      * @throws ApplicationRuntimeException
@@ -313,30 +317,27 @@
      * @since 4.0
      */
 
-    static void addBindingToComponent(IComponent component, String parameterName, IBinding binding)
+    static void addBindingToComponent(IComponent component,
+            String parameterName, IBinding binding)
     {
         IBinding existing = component.getBinding(parameterName);
 
         if (existing != null)
-            throw new ApplicationRuntimeException(PageloadMessages.duplicateParameter(
-                    parameterName,
-                    existing), component, binding.getLocation(), null);
+            throw new ApplicationRuntimeException(PageloadMessages
+                    .duplicateParameter(parameterName, existing), component,
+                    binding.getLocation(), null);
 
         component.setBinding(parameterName, binding);
     }
 
-    private IBinding convert(IComponent container, String description, String defaultBindingType,
-            IBindingSpecification spec)
+    private IBinding convert(IComponent container, String description,
+            String defaultBindingType, IBindingSpecification spec)
     {
         Location location = spec.getLocation();
         String bindingReference = spec.getValue();
 
-        return _bindingSource.createBinding(
-                container,
-                description,
-                bindingReference,
-                defaultBindingType,
-                location);
+        return _bindingSource.createBinding(container, description,
+                bindingReference, defaultBindingType, location);
     }
 
     /**
@@ -351,7 +352,8 @@
      * </ul>
      * 
      * @param cycle
-     *            the request cycle for which the page is being (initially) constructed
+     *            the request cycle for which the page is being (initially)
+     *            constructed
      * @param page
      *            The page on which the container exists.
      * @param container
@@ -362,23 +364,23 @@
      *            namespace of the container
      */
 
-    private void constructComponent(IRequestCycle cycle, IPage page, IComponent container,
-            IComponentSpecification containerSpec, INamespace namespace)
+    private void constructComponent(IRequestCycle cycle, IPage page,
+            IComponent container, IComponentSpecification containerSpec,
+            INamespace namespace)
     {
         _depth++;
-        if (_depth > _maxDepth)
-            _maxDepth = _depth;
+        if (_depth > _maxDepth) _maxDepth = _depth;
 
-        String defaultBindingPrefix = _componentPropertySource.getComponentProperty(
-                container,
-                TapestryConstants.DEFAULT_BINDING_PREFIX_NAME);
+        String defaultBindingPrefix = _componentPropertySource
+                .getComponentProperty(container,
+                        TapestryConstants.DEFAULT_BINDING_PREFIX_NAME);
 
         List ids = new ArrayList(containerSpec.getComponentIds());
         int count = ids.size();
 
         try
         {
-            for (int i = 0; i < count; i++)
+            for(int i = 0; i < count; i++)
             {
                 String id = (String) ids.get(i);
 
@@ -394,18 +396,14 @@
 
                 IComponentSpecification componentSpecification = _componentResolver
                         .getSpecification();
-                INamespace componentNamespace = _componentResolver.getNamespace();
+                INamespace componentNamespace = _componentResolver
+                        .getNamespace();
 
                 // Instantiate the contained component.
 
-                IComponent component = instantiateComponent(
-                        page,
-                        container,
-                        id,
-                        componentSpecification,
-                        _componentResolver.getType(),
-                        componentNamespace,
-                        contained);
+                IComponent component = instantiateComponent(page, container,
+                        id, componentSpecification, _componentResolver
+                                .getType(), componentNamespace, contained);
 
                 // Add it, by name, to the container.
 
@@ -418,12 +416,8 @@
                 // Now construct the component recusively; it gets its chance
                 // to create its subcomponents and set their bindings.
 
-                constructComponent(
-                        cycle,
-                        page,
-                        component,
-                        componentSpecification,
-                        componentNamespace);
+                constructComponent(cycle, page, component,
+                        componentSpecification, componentNamespace);
             }
 
             addAssets(container, containerSpec);
@@ -448,28 +442,31 @@
         }
         catch (RuntimeException ex)
         {
-            throw new ApplicationRuntimeException(PageloadMessages.unableToInstantiateComponent(
-                    container,
-                    ex), container, null, ex);
+            throw new ApplicationRuntimeException(PageloadMessages
+                    .unableToInstantiateComponent(container, ex), container,
+                    null, ex);
         }
 
         _depth--;
     }
 
     /**
-     * Invoked to create an implicit component (one which is defined in the containing component's
-     * template, rather that in the containing component's specification).
+     * Invoked to create an implicit component (one which is defined in the
+     * containing component's template, rather that in the containing
+     * component's specification).
      * 
      * @see org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl
      * @since 3.0
      */
 
-    public IComponent createImplicitComponent(IRequestCycle cycle, IComponent container,
-            String componentId, String componentType, Location location)
+    public IComponent createImplicitComponent(IRequestCycle cycle,
+            IComponent container, String componentId, String componentType,
+            Location location)
     {
         IPage page = container.getPage();
 
-        _componentResolver.resolve(cycle, container.getNamespace(), componentType, location);
+        _componentResolver.resolve(cycle, container.getNamespace(),
+                componentType, location);
 
         INamespace componentNamespace = _componentResolver.getNamespace();
         IComponentSpecification spec = _componentResolver.getSpecification();
@@ -478,13 +475,8 @@
         contained.setLocation(location);
         contained.setType(componentType);
 
-        IComponent result = instantiateComponent(
-                page,
-                container,
-                componentId,
-                spec,
-                _componentResolver.getType(),
-                componentNamespace,
+        IComponent result = instantiateComponent(page, container, componentId,
+                spec, _componentResolver.getType(), componentNamespace,
                 contained);
 
         container.addComponent(result);
@@ -497,19 +489,20 @@
     }
 
     /**
-     * Instantiates a component from its specification. We instantiate the component object, then
-     * set its specification, page, container and id.
+     * Instantiates a component from its specification. We instantiate the
+     * component object, then set its specification, page, container and id.
      * 
      * @see AbstractComponent
      */
 
-    private IComponent instantiateComponent(IPage page, IComponent container, String id,
-            IComponentSpecification spec, String type, INamespace namespace,
-            IContainedComponent containedComponent)
-    {
-        ComponentClassProviderContext context = new ComponentClassProviderContext(type, spec,
-                namespace);
-        String className = _componentClassProvider.provideComponentClassName(context);
+    private IComponent instantiateComponent(IPage page, IComponent container,
+            String id, IComponentSpecification spec, String type,
+            INamespace namespace, IContainedComponent containedComponent)
+    {
+        ComponentClassProviderContext context = new ComponentClassProviderContext(
+                type, spec, namespace);
+        String className = _componentClassProvider
+                .provideComponentClassName(context);
 
         // String className = spec.getComponentClassName();
 
@@ -521,16 +514,17 @@
 
             if (!IComponent.class.isAssignableFrom(componentClass))
                 throw new ApplicationRuntimeException(PageloadMessages
-                        .classNotComponent(componentClass), container, spec.getLocation(), null);
+                        .classNotComponent(componentClass), container, spec
+                        .getLocation(), null);
 
             if (IPage.class.isAssignableFrom(componentClass))
-                throw new ApplicationRuntimeException(PageloadMessages.pageNotAllowed(id),
-                        container, spec.getLocation(), null);
+                throw new ApplicationRuntimeException(PageloadMessages
+                        .pageNotAllowed(id), container, spec.getLocation(),
+                        null);
         }
 
-        ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
-                spec,
-                className);
+        ComponentConstructor cc = _componentConstructorFactory
+                .getComponentConstructor(spec, className);
 
         IComponent result = (IComponent) cc.newInstance();
 
@@ -554,30 +548,31 @@
      * @param namespace
      *            the namespace containing the page's specification
      * @param spec
-     *            the page's specification We instantiate the page object, then set its
-     *            specification, names and locale.
+     *            the page's specification We instantiate the page object, then
+     *            set its specification, names and locale.
      * @see IEngine
      * @see ChangeObserver
      */
 
-    private IPage instantiatePage(String name, INamespace namespace, IComponentSpecification spec)
+    private IPage instantiatePage(String name, INamespace namespace,
+            IComponentSpecification spec)
     {
         Location location = spec.getLocation();
-        ComponentClassProviderContext context = new ComponentClassProviderContext(name, spec,
-                namespace);
-        String className = _pageClassProvider.provideComponentClassName(context);
+        ComponentClassProviderContext context = new ComponentClassProviderContext(
+                name, spec, namespace);
+        String className = _pageClassProvider
+                .provideComponentClassName(context);
 
         Class pageClass = _classResolver.findClass(className);
 
         if (!IPage.class.isAssignableFrom(pageClass))
-            throw new ApplicationRuntimeException(PageloadMessages.classNotPage(pageClass),
-                    location, null);
+            throw new ApplicationRuntimeException(PageloadMessages
+                    .classNotPage(pageClass), location, null);
 
         String pageName = namespace.constructQualifiedName(name);
 
-        ComponentConstructor cc = _componentConstructorFactory.getComponentConstructor(
-                spec,
-                className);
+        ComponentConstructor cc = _componentConstructorFactory
+                .getComponentConstructor(spec, className);
 
         IPage result = (IPage) cc.newInstance();
 
@@ -590,8 +585,8 @@
         return result;
     }
 
-    public IPage loadPage(String name, INamespace namespace, IRequestCycle cycle,
-            IComponentSpecification specification)
+    public IPage loadPage(String name, INamespace namespace,
+            IRequestCycle cycle, IComponentSpecification specification)
     {
         IPage page = null;
 
@@ -605,8 +600,10 @@
         {
             page = instantiatePage(name, namespace, specification);
 
-            // The page is now attached to the engine and request cycle; some code
-            // inside the page's finishLoad() method may require this. TAPESTRY-763
+            // The page is now attached to the engine and request cycle; some
+            // code
+            // inside the page's finishLoad() method may require this.
+            // TAPESTRY-763
 
             page.attach(cycle.getEngine(), cycle);
 
@@ -635,15 +632,16 @@
         }
 
         if (_log.isDebugEnabled())
-            _log.debug("Loaded page " + page + " with " + _count + " components (maximum depth "
-                    + _maxDepth + ")");
+            _log.debug("Loaded page " + page + " with " + _count
+                    + " components (maximum depth " + _maxDepth + ")");
 
         return page;
     }
 
     /** @since 4.0 */
 
-    public void loadTemplateForComponent(IRequestCycle cycle, ITemplateComponent component)
+    public void loadTemplateForComponent(IRequestCycle cycle,
+            ITemplateComponent component)
     {
         _componentTemplateLoader.loadTemplate(cycle, component);
     }
@@ -654,7 +652,7 @@
 
         int count = _inheritedBindingQueue.size();
 
-        for (int i = 0; i < count; i++)
+        for(int i = 0; i < count; i++)
         {
             IQueuedInheritedBinding queued = (IQueuedInheritedBinding) _inheritedBindingQueue
                     .get(i);
@@ -663,16 +661,16 @@
         }
     }
 
-    private void addAssets(IComponent component, IComponentSpecification specification)
+    private void addAssets(IComponent component,
+            IComponentSpecification specification)
     {
         List names = specification.getAssetNames();
 
-        if (names.isEmpty())
-            return;
+        if (names.isEmpty()) return;
 
         Iterator i = names.iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
             String name = (String) i.next();
 
@@ -708,7 +706,8 @@
 
     private boolean isContextResource(Resource resource)
     {
-        return (resource instanceof WebContextResource) || (resource instanceof ContextResource);
+        return (resource instanceof WebContextResource)
+                || (resource instanceof ContextResource);
     }
 
     /** @since 4.0 */
@@ -735,7 +734,8 @@
     /**
      * @since 4.0
      */
-    public void setComponentTemplateLoader(ComponentTemplateLoader componentTemplateLoader)
+    public void setComponentTemplateLoader(
+            ComponentTemplateLoader componentTemplateLoader)
     {
         _componentTemplateLoader = componentTemplateLoader;
     }
@@ -781,7 +781,8 @@
     /**
      * @since 4.0
      */
-    public void setComponentClassProvider(ComponentClassProvider componentClassProvider)
+    public void setComponentClassProvider(
+            ComponentClassProvider componentClassProvider)
     {
         _componentClassProvider = componentClassProvider;
     }
@@ -793,8 +794,9 @@
     }
 
     /** @since 4.0 */
-    public void setComponentPropertySource(ComponentPropertySource componentPropertySource)
+    public void setComponentPropertySource(
+            ComponentPropertySource componentPropertySource)
     {
         _componentPropertySource = componentPropertySource;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageloadMessages.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageloadMessages.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageloadMessages.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/PageloadMessages.java Fri May  5 09:20:58 2006
@@ -22,64 +22,75 @@
 import org.apache.tapestry.spec.IContainedComponent;
 
 /**
- * Messages for the pageload package
+ * Messages for the pageload package.
  * 
  * @author Howard Lewis Ship
  * @since 4.0
  */
-class PageloadMessages
+final class PageloadMessages
 {
-    private final static MessageFormatter _formatter = new MessageFormatter(PageloadMessages.class);
 
-    static String parameterMustHaveNoDefaultValue(IComponent component, String name)
+    private static final MessageFormatter _formatter = new MessageFormatter(
+            PageloadMessages.class);
+
+    /* defeat instantiation */
+    private PageloadMessages()
     {
-        return _formatter.format(
-                "parameter-must-have-no-default-value",
-                component.getExtendedId(),
-                name);
     }
 
-    static String unableToInitializeProperty(String propertyName, IComponent component,
-            Throwable cause)
+    static String parameterMustHaveNoDefaultValue(IComponent component,
+            String name)
+    {
+        return _formatter.format("parameter-must-have-no-default-value",
+                component.getExtendedId(), name);
+    }
+
+    static String unableToInitializeProperty(String propertyName,
+            IComponent component, Throwable cause)
     {
-        return _formatter.format("unable-to-initialize-property", propertyName, component, cause);
+        return _formatter.format("unable-to-initialize-property", propertyName,
+                component, cause);
     }
 
     static String requiredParameterNotBound(String name, IComponent component)
     {
-        return _formatter.format("required-parameter-not-bound", name, component.getExtendedId());
+        return _formatter.format("required-parameter-not-bound", name,
+                component.getExtendedId());
     }
 
     static String inheritInformalInvalidComponentFormalOnly(IComponent component)
     {
-        return _formatter.format("inherit-informal-invalid-component-formal-only", component
-                .getExtendedId());
+        return _formatter.format(
+                "inherit-informal-invalid-component-formal-only", component
+                        .getExtendedId());
     }
 
-    static String inheritInformalInvalidContainerFormalOnly(IComponent container,
-            IComponent component)
+    static String inheritInformalInvalidContainerFormalOnly(
+            IComponent container, IComponent component)
     {
-        return _formatter.format("inherit-informal-invalid-container-formal-only", container
-                .getExtendedId(), component.getExtendedId());
+        return _formatter.format(
+                "inherit-informal-invalid-container-formal-only", container
+                        .getExtendedId(), component.getExtendedId());
     }
 
-    static String formalParametersOnly(IComponent component, String parameterName)
+    static String formalParametersOnly(IComponent component,
+            String parameterName)
     {
-        return _formatter
-                .format("formal-parameters-only", component.getExtendedId(), parameterName);
+        return _formatter.format("formal-parameters-only", component
+                .getExtendedId(), parameterName);
     }
 
-    static String unableToInstantiateComponent(IComponent container, Throwable cause)
+    static String unableToInstantiateComponent(IComponent container,
+            Throwable cause)
     {
-        return _formatter.format(
-                "unable-to-instantiate-component",
-                container.getExtendedId(),
-                cause);
+        return _formatter.format("unable-to-instantiate-component", container
+                .getExtendedId(), cause);
     }
 
     static String classNotComponent(Class componentClass)
     {
-        return _formatter.format("class-not-component", componentClass.getName());
+        return _formatter.format("class-not-component", componentClass
+                .getName());
     }
 
     static String unableToInstantiate(String className, Throwable cause)
@@ -118,18 +129,19 @@
                 .getLocationString(binding));
     }
 
-    public static String usedParameterAlias(IContainedComponent contained, String name,
-            String parameterName, Location bindingLocation)
+    public static String usedParameterAlias(IContainedComponent contained,
+            String name, String parameterName, Location bindingLocation)
     {
-        return _formatter.format("used-parameter-alias", new Object[]
-        { HiveMind.getLocationString(bindingLocation), contained.getType(), name, parameterName });
+        return _formatter.format("used-parameter-alias", new Object[] {
+                HiveMind.getLocationString(bindingLocation),
+                contained.getType(), name, parameterName });
     }
 
-    public static String deprecatedParameter(String parameterName, Location location,
-            String componentType)
+    public static String deprecatedParameter(String parameterName,
+            Location location, String componentType)
     {
-        return _formatter.format("deprecated-parameter", parameterName, HiveMind
-                .getLocationString(location), componentType);
+        return _formatter.format("deprecated-parameter", parameterName,
+                HiveMind.getLocationString(location), componentType);
     }
 
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritInformalBindings.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritInformalBindings.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritInformalBindings.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritInformalBindings.java Fri May  5 09:20:58 2006
@@ -22,12 +22,13 @@
 
 /**
  * Used to defer connection of inherited informal bindings.
- *
+ * 
  * @author Howard Lewis Ship
  * @since 4.0
  */
 class QueuedInheritInformalBindings implements IQueuedInheritedBinding
 {
+
     private IComponent _component;
 
     QueuedInheritInformalBindings(IComponent component)
@@ -40,37 +41,32 @@
 
         IComponent container = _component.getContainer();
 
-        for (Iterator it = container.getBindingNames().iterator(); it.hasNext();)
+        for(Iterator it = container.getBindingNames().iterator(); it.hasNext();)
         {
             String bindingName = (String) it.next();
             connectInformalBinding(container, _component, bindingName);
         }
     }
 
-    private void connectInformalBinding(
-        IComponent container,
-        IComponent component,
-        String bindingName)
+    private void connectInformalBinding(IComponent container,
+            IComponent component, String bindingName)
     {
         IComponentSpecification componentSpec = component.getSpecification();
         IComponentSpecification containerSpec = container.getSpecification();
 
         // check if binding already exists in the component
-        if (component.getBinding(bindingName) != null)
-            return;
+        if (component.getBinding(bindingName) != null) return;
 
         // check if parameter is informal for the component
         if (componentSpec.getParameter(bindingName) != null
-            || componentSpec.isReservedParameterName(bindingName))
-            return;
+                || componentSpec.isReservedParameterName(bindingName)) return;
 
         // check if parameter is informal for the container
         if (containerSpec.getParameter(bindingName) != null
-            || containerSpec.isReservedParameterName(bindingName))
-            return;
+                || containerSpec.isReservedParameterName(bindingName)) return;
 
         // if everything passes, establish binding
         IBinding binding = container.getBinding(bindingName);
         component.setBinding(bindingName, binding);
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritedBinding.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritedBinding.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritedBinding.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/QueuedInheritedBinding.java Fri May  5 09:20:58 2006
@@ -18,21 +18,23 @@
 import org.apache.tapestry.IComponent;
 
 /**
- * Handles connecting an inherited binding. These will be going away soon (if not in release 4.0
- * itself).
+ * Handles connecting an inherited binding. These will be going away soon (if
+ * not in release 4.0 itself).
  * 
  * @author Howard Lewis Ship
  * @since 4.0
  */
 class QueuedInheritedBinding implements IQueuedInheritedBinding
 {
+
     private IComponent _component;
 
     private String _containerParameterName;
 
     private String _parameterName;
 
-    QueuedInheritedBinding(IComponent component, String containerParameterName, String parameterName)
+    QueuedInheritedBinding(IComponent component, String containerParameterName,
+            String parameterName)
     {
         _component = component;
         _containerParameterName = containerParameterName;
@@ -41,17 +43,19 @@
 
     public void connect()
     {
-        IBinding binding = _component.getContainer().getBinding(_containerParameterName);
+        IBinding binding = _component.getContainer().getBinding(
+                _containerParameterName);
 
-        if (binding == null)
-            return;
+        if (binding == null) return;
 
-        // In many cases, a default parameter binding will have been set on the child component
+        // In many cases, a default parameter binding will have been set on the
+        // child component
         // parameter, which
-        // gets overwritten by this inherited binding. There's still a lot of ambiquity concerning
+        // gets overwritten by this inherited binding. There's still a lot of
+        // ambiquity concerning
         // binding
         // an alias this way.
 
         _component.setBinding(_parameterName, binding);
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/SpecificationComponentClassProvider.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/SpecificationComponentClassProvider.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/SpecificationComponentClassProvider.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pageload/SpecificationComponentClassProvider.java Fri May  5 09:20:58 2006
@@ -15,20 +15,22 @@
 package org.apache.tapestry.pageload;
 
 /**
- * Implementation of {@link org.apache.tapestry.pageload.ComponentClassProvider} that returns the
- * value from the specification.
+ * Implementation of {@link org.apache.tapestry.pageload.ComponentClassProvider}
+ * that returns the value from the specification.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public class SpecificationComponentClassProvider implements ComponentClassProvider
+public class SpecificationComponentClassProvider implements
+        ComponentClassProvider
 {
 
-    public String provideComponentClassName(ComponentClassProviderContext context)
+    public String provideComponentClassName(
+            ComponentClassProviderContext context)
     {
         // May return null when the spec doesn't indicate the class name.
 
         return context.getSpecification().getComponentClassName();
     }
 
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pages/Exception.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pages/Exception.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pages/Exception.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/pages/Exception.java Fri May  5 09:20:58 2006
@@ -27,7 +27,8 @@
 
 public abstract class Exception extends BasePage implements PageDetachListener
 {
-    /** Transient property */
+
+    /** Transient property. */
     public abstract void setExceptions(ExceptionDescription[] exceptions);
 
     public void setException(Throwable value)
@@ -38,4 +39,4 @@
 
         setExceptions(exceptions);
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TemplateTokenFactory.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TemplateTokenFactory.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TemplateTokenFactory.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TemplateTokenFactory.java Fri May  5 09:20:58 2006
@@ -19,18 +19,20 @@
 import org.apache.hivemind.Location;
 
 /**
- *  A Factory used by {@link org.apache.tapestry.parse.TemplateParser} to create 
- *  {@link org.apache.tapestry.parse.TemplateToken} objects.
+ * A Factory used by {@link org.apache.tapestry.parse.TemplateParser} to create
+ * {@link org.apache.tapestry.parse.TemplateToken} objects.
+ * <p>
+ * This class is extended by Spindle - the Eclipse Plugin for Tapestry.
+ * <p>
  * 
- *  <p>
- *  This class is extended by Spindle - the Eclipse Plugin for Tapestry.
- *  <p>
- *  @author glongman@intelligentworks.com
- *  @since 3.0
+ * @author glongman@intelligentworks.com
+ * @since 3.0
  */
 public class TemplateTokenFactory
 {
-    public OpenToken createOpenToken(String tagName, String jwcId, String type, Location location)
+
+    public OpenToken createOpenToken(String tagName, String jwcId, String type,
+            Location location)
     {
         return new OpenToken(tagName, jwcId, type, location);
     }
@@ -40,22 +42,17 @@
         return new CloseToken(tagName, location);
     }
 
-    public TextToken createTextToken(
-        char[] templateData,
-        int blockStart,
-        int end,
-        Location templateLocation)
+    public TextToken createTextToken(char[] templateData, int blockStart,
+            int end, Location templateLocation)
     {
         return new TextToken(templateData, blockStart, end, templateLocation);
     }
 
-    public LocalizationToken createLocalizationToken(
-        String tagName,
-        String localizationKey,
-        boolean raw,
-        Map attributes,
-        Location startLocation)
+    public LocalizationToken createLocalizationToken(String tagName,
+            String localizationKey, boolean raw, Map attributes,
+            Location startLocation)
     {
-        return new LocalizationToken(tagName, localizationKey, raw, attributes, startLocation);
+        return new LocalizationToken(tagName, localizationKey, raw, attributes,
+                startLocation);
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TokenType.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TokenType.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TokenType.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/parse/TokenType.java Fri May  5 09:20:58 2006
@@ -21,8 +21,9 @@
  * @author Howard Lewis Ship
  */
 
-public class TokenType
+public final class TokenType
 {
+
     /**
      * Raw HTML text.
      * 
@@ -71,4 +72,4 @@
     {
         return _name;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderImpl.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderImpl.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderImpl.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderImpl.java Fri May  5 09:20:58 2006
@@ -34,6 +34,7 @@
  */
 public class PageRecorderImpl implements IPageRecorder
 {
+
     private String _pageName;
 
     private IRequestCycle _requestCycle;
@@ -74,7 +75,7 @@
 
         Iterator i = changes.iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
             PropertyChange change = (PropertyChange) i.next();
 
@@ -86,9 +87,11 @@
     {
         String idPath = change.getComponentPath();
 
-        IComponent component = (idPath == null) ? page : page.getNestedComponent(idPath);
+        IComponent component = (idPath == null) ? page : page
+                .getNestedComponent(idPath);
 
-        PropertyUtils.write(component, change.getPropertyName(), change.getNewValue());
+        PropertyUtils.write(component, change.getPropertyName(), change
+                .getNewValue());
     }
 
     public void observeChange(ObservedChangeEvent event)
@@ -98,37 +101,40 @@
 
         if (_locked)
         {
-            _log.error(RecordMessages.recorderLocked(propertyName, component), null, null);
+            _log.error(RecordMessages.recorderLocked(propertyName, component),
+                    null, null);
             return;
         }
 
-        PropertyPersistenceStrategy strategy = findStrategy(component, propertyName);
+        PropertyPersistenceStrategy strategy = findStrategy(component,
+                propertyName);
 
         if (strategy != null)
-            strategy.store(_pageName, component.getIdPath(), propertyName, event.getNewValue());
+            strategy.store(_pageName, component.getIdPath(), propertyName,
+                    event.getNewValue());
     }
 
     // package private for testing
 
-    PropertyPersistenceStrategy findStrategy(IComponent component, String propertyName)
+    PropertyPersistenceStrategy findStrategy(IComponent component,
+            String propertyName)
     {
         // So much for Law of Demeter!
 
-        IPropertySpecification propertySpecification = component.getSpecification()
-                .getPropertySpecification(propertyName);
+        IPropertySpecification propertySpecification = component
+                .getSpecification().getPropertySpecification(propertyName);
 
         if (propertySpecification == null)
         {
-            _log.error(
-                    RecordMessages.missingPropertySpecification(propertyName, component),
-                    null,
-                    null);
+            _log.error(RecordMessages.missingPropertySpecification(
+                    propertyName, component), null, null);
             return null;
         }
 
         String name = propertySpecification.getPersistence();
 
-        // Should check for nulls, but the architecture of the framework pretty much
+        // Should check for nulls, but the architecture of the framework pretty
+        // much
         // ensures that we won't get here unless there is a property
         // and a persistence value for the property.
 
@@ -138,10 +144,12 @@
         }
         catch (ApplicationRuntimeException ex)
         {
-            _log.error(ex.getMessage(), propertySpecification.getLocation(), ex);
+            _log
+                    .error(ex.getMessage(),
+                            propertySpecification.getLocation(), ex);
 
             return null;
         }
     }
 
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderSource.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderSource.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderSource.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PageRecorderSource.java Fri May  5 09:20:58 2006
@@ -18,13 +18,14 @@
 import org.apache.tapestry.engine.IPageRecorder;
 
 /**
- * Used to obtain a page recorder instance. Starting in Tapestry 3.0, page recorders are short-lived
- * and specific to a single request.
+ * Used to obtain a page recorder instance. Starting in Tapestry 3.0, page
+ * recorders are short-lived and specific to a single request.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface PageRecorderSource
 {
-    public IPageRecorder createPageRecorder(IPage page);
-}
\ No newline at end of file
+
+    IPageRecorder createPageRecorder(IPage page);
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyData.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyData.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyData.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyData.java Fri May  5 09:20:58 2006
@@ -23,16 +23,19 @@
 import org.apache.hivemind.util.Defense;
 
 /**
- * Stores persistent property changes concerning a single page. The data may be stored as an encoded
- * string and the PPD can turn between encoded and object form.
+ * Stores persistent property changes concerning a single page. The data may be
+ * stored as an encoded string and the PPD can turn between encoded and object
+ * form.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public class PersistentPropertyData
 {
+
     /**
-     * Keyed on {@link org.apache.tapestry.record.ChangeKey}, values are new objects.
+     * Keyed on {@link org.apache.tapestry.record.ChangeKey}, values are new
+     * objects.
      */
 
     private Map _changes;
@@ -42,7 +45,8 @@
     private final PersistentPropertyDataEncoder _encoder;
 
     /**
-     * Creates a new data using the specified encoder. The set of page changes is initially empty.
+     * Creates a new data using the specified encoder. The set of page changes
+     * is initially empty.
      */
 
     public PersistentPropertyData(PersistentPropertyDataEncoder encoder)
@@ -55,8 +59,7 @@
 
     public String getEncoded()
     {
-        if (_encoded == null)
-            _encoded = encode();
+        if (_encoded == null) _encoded = encode();
 
         return _encoded;
     }
@@ -109,16 +112,16 @@
 
         Iterator i = _changes.entrySet().iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
             Map.Entry me = (Map.Entry) i.next();
 
             ChangeKey changeKey = (ChangeKey) me.getKey();
             Object value = me.getValue();
 
-            PropertyChange change = new PropertyChangeImpl(changeKey.getComponentPath(), changeKey
-                    .getPropertyName(), value);
-            
+            PropertyChange change = new PropertyChangeImpl(changeKey
+                    .getComponentPath(), changeKey.getPropertyName(), value);
+
             result.add(change);
         }
 
@@ -137,7 +140,7 @@
         Map result = new HashMap();
 
         Iterator i = pageChanges.iterator();
-        while (i.hasNext())
+        while(i.hasNext())
         {
             PropertyChange pc = (PropertyChange) i.next();
 
@@ -151,4 +154,4 @@
 
         return result;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoder.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoder.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoder.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoder.java Fri May  5 09:20:58 2006
@@ -17,27 +17,28 @@
 import java.util.List;
 
 /**
- * Responsible for encoding {@link org.apache.tapestry.record.PropertyChange}s into and out of plain
- * strings.
+ * Responsible for encoding {@link org.apache.tapestry.record.PropertyChange}s
+ * into and out of plain strings.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface PersistentPropertyDataEncoder
 {
+
     /**
-     * Encodes a (possibly empty) list of {@link PropertyChange}s into a string representation that
-     * can later be decoded.
+     * Encodes a (possibly empty) list of {@link PropertyChange}s into a string
+     * representation that can later be decoded.
      * 
      * @returns encoded string (possibly empty, but not null)
      */
-    public String encodePageChanges(List changes);
+    String encodePageChanges(List changes);
 
     /**
-     * Takes a string with an encoded set of page changes, and converts it back into a list of
-     * {@link org.apache.tapestry.record.PropertyChange}s.
+     * Takes a string with an encoded set of page changes, and converts it back
+     * into a list of {@link org.apache.tapestry.record.PropertyChange}s.
      */
 
-    public List decodePageChanges(String encoded);
+    List decodePageChanges(String encoded);
 
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoderImpl.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoderImpl.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoderImpl.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PersistentPropertyDataEncoderImpl.java Fri May  5 09:20:58 2006
@@ -50,8 +50,6 @@
  */
 public class PersistentPropertyDataEncoderImpl implements PersistentPropertyDataEncoder
 {
-    private ClassResolver _classResolver;
-
     /**
      * Prefix on the MIME encoding that indicates that the encoded data is not encoded.
      */
@@ -64,6 +62,8 @@
 
     public static final String GZIP_BYTESTREAM_PREFIX = "Z";
 
+    private ClassResolver _classResolver;
+    
     public String encodePageChanges(List changes)
     {
         Defense.notNull(changes, "changes");
@@ -193,4 +193,4 @@
     {
         _classResolver = resolver;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChange.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChange.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChange.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChange.java Fri May  5 09:20:58 2006
@@ -15,8 +15,8 @@
 package org.apache.tapestry.record;
 
 /**
- * Represents a change to a component on a page, this represents a datum of information stored by a
- * {@link org.apache.tapestry.engine.IPageRecorder}.
+ * Represents a change to a component on a page, this represents a datum of
+ * information stored by a {@link org.apache.tapestry.engine.IPageRecorder}.
  * <p>
  * Renamed from IPageChange in release 4.0.
  * 
@@ -25,21 +25,23 @@
 
 public interface PropertyChange
 {
+
     /**
-     * The path to the component on the page, or null if the property is a property of the page.
+     * The path to the component on the page, or null if the property is a
+     * property of the page.
      */
 
-    public String getComponentPath();
+    String getComponentPath();
 
     /**
      * The new value for the property, which may be null.
      */
 
-    public Object getNewValue();
+    Object getNewValue();
 
     /**
      * The name of the property that changed.
      */
 
-    public String getPropertyName();
-}
\ No newline at end of file
+    String getPropertyName();
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChangeImpl.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChangeImpl.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChangeImpl.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyChangeImpl.java Fri May  5 09:20:58 2006
@@ -25,13 +25,15 @@
 
 public class PropertyChangeImpl implements PropertyChange
 {
+
     private String _componentPath;
 
     private String _propertyName;
 
     private Object _newValue;
 
-    public PropertyChangeImpl(String componentPath, String propertyName, Object newValue)
+    public PropertyChangeImpl(String componentPath, String propertyName,
+            Object newValue)
     {
         Defense.notNull(propertyName, "propertyName");
 
@@ -44,7 +46,8 @@
     }
 
     /**
-     * The path to the component on the page, or null if the property is a property of the page.
+     * The path to the component on the page, or null if the property is a
+     * property of the page.
      */
 
     public String getComponentPath()
@@ -83,8 +86,7 @@
 
     public boolean equals(Object object)
     {
-        if (this == object)
-            return true;
+        if (this == object) return true;
 
         if (object == null || object.getClass() != this.getClass())
             return false;
@@ -92,11 +94,12 @@
         PropertyChangeImpl other = (PropertyChangeImpl) object;
 
         return same(_componentPath, other._componentPath)
-                && same(_propertyName, other._propertyName) && same(_newValue, other._newValue);
+                && same(_propertyName, other._propertyName)
+                && same(_newValue, other._newValue);
     }
 
     private boolean same(Object o1, Object o2)
     {
         return o1 == o2 || (o1 != null && o1.equals(o2));
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategy.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategy.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategy.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategy.java Fri May  5 09:20:58 2006
@@ -19,14 +19,16 @@
 import org.apache.tapestry.engine.ServiceEncoding;
 
 /**
- * Defines how a persistent property is made persistent. The typical implementation is to store the
- * persistent property into the session as a session attribute.
+ * Defines how a persistent property is made persistent. The typical
+ * implementation is to store the persistent property into the session as a
+ * session attribute.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface PropertyPersistenceStrategy
 {
+
     /**
      * Stores the new value.
      * 
@@ -40,35 +42,43 @@
      *            the new value (which may be null)
      */
 
-    public void store(String pageName, String idPath, String propertyName, Object newValue);
+    void store(String pageName, String idPath, String propertyName,
+            Object newValue);
 
     /**
-     * Returns a collection of {@link org.apache.tapestry.record.PropertyChange}s. These represent
-     * prior changes previously stored. The order is not significant. Must not return null. Does not
-     * have to reflect changes made during the current request (this method is typically invoked as
-     * part of rolling back a page to a prior state, before any further changes are possible).
+     * Returns a collection of {@link org.apache.tapestry.record.PropertyChange}s.
+     * These represent prior changes previously stored. The order is not
+     * significant. Must not return null. Does not have to reflect changes made
+     * during the current request (this method is typically invoked as part of
+     * rolling back a page to a prior state, before any further changes are
+     * possible).
      */
 
-    public Collection getStoredChanges(String pageName);
+    Collection getStoredChanges(String pageName);
 
     /**
      * Invoked to discard any stored changes for the specified page.
      */
-    public void discardStoredChanges(String pageName);
+    void discardStoredChanges(String pageName);
 
     /**
-     * Invoked by a {@link org.apache.tapestry.services.LinkFactory}&nbsp;, the parameters may be
-     * modified (added to) to store information related to persistent properties. This method is
-     * forwarded to all {@link PropertyPersistenceStrategy}s.
+     * Invoked by a {@link org.apache.tapestry.services.LinkFactory}&nbsp;, the
+     * parameters may be modified (added to) to store information related to
+     * persistent properties. This method is forwarded to all
+     * {@link PropertyPersistenceStrategy}s.
      * 
      * @param encoding
-     *            Service encoding, which indentifies the URL and the query parameters from which
-     *            the {@link org.apache.tapestry.engine.ILink}&nbsp;will be created.
+     *            Service encoding, which indentifies the URL and the query
+     *            parameters from which the
+     *            {@link org.apache.tapestry.engine.ILink}&nbsp;will be
+     *            created.
      * @param post
-     *            if true, then the link will be used for a post (not a get, i.e., for a HTML form);
-     *            this may affect what information is encoded into the link
+     *            if true, then the link will be used for a post (not a get,
+     *            i.e., for a HTML form); this may affect what information is
+     *            encoded into the link
      * @see PropertyPersistenceStrategySource
      */
 
-    public void addParametersForPersistentProperties(ServiceEncoding encoding, boolean post);
-}
\ No newline at end of file
+    void addParametersForPersistentProperties(ServiceEncoding encoding,
+            boolean post);
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategyContribution.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategyContribution.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategyContribution.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategyContribution.java Fri May  5 09:20:58 2006
@@ -17,13 +17,15 @@
 import org.apache.hivemind.impl.BaseLocatable;
 
 /**
- * A contribution to the <code>tapestry.persist.PersistenceStrategy</code> configuration.
+ * A contribution to the <code>tapestry.persist.PersistenceStrategy</code>
+ * configuration.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public class PropertyPersistenceStrategyContribution extends BaseLocatable
 {
+
     private String _name;
 
     private PropertyPersistenceStrategy _strategy;
@@ -47,4 +49,4 @@
     {
         _strategy = strategy;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySource.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySource.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySource.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySource.java Fri May  5 09:20:58 2006
@@ -26,6 +26,7 @@
  */
 public interface PropertyPersistenceStrategySource
 {
+
     /**
      * Returns the name strategy.
      * 
@@ -34,36 +35,40 @@
      * @throws org.apache.hivemind.ApplicationRuntimeException
      *             if no such strategy exists.
      */
-    public PropertyPersistenceStrategy getStrategy(String name);
+    PropertyPersistenceStrategy getStrategy(String name);
 
     /**
-     * Returns all changes ({@link PropertyChange}) collected by any persistence strategy for the
-     * page. May return an empty list.
+     * Returns all changes ({@link PropertyChange}) collected by any
+     * persistence strategy for the page. May return an empty list.
      * 
      * @see PropertyPersistenceStrategy#getStoredChanges(String)
      */
 
-    public Collection getAllStoredChanges(String pageName);
+    Collection getAllStoredChanges(String pageName);
 
     /**
      * Discards any stored property changes for the named page.
      */
 
-    public void discardAllStoredChanged(String pageName);
+    void discardAllStoredChanged(String pageName);
 
     /**
-     * Invoked by a {@link org.apache.tapestry.services.LinkFactory}&nbsp;, the parameters may be
-     * modified (added to) to store information related to persistent properties. This method is
-     * forwarded to all {@link PropertyPersistenceStrategy}s.
+     * Invoked by a {@link org.apache.tapestry.services.LinkFactory}&nbsp;, the
+     * parameters may be modified (added to) to store information related to
+     * persistent properties. This method is forwarded to all
+     * {@link PropertyPersistenceStrategy}s.
      * 
      * @param encoding
-     *            Service encoding, which indentifies the URL and the query parameters from which
-     *            the {@link org.apache.tapestry.engine.ILink} will be created.
+     *            Service encoding, which indentifies the URL and the query
+     *            parameters from which the
+     *            {@link org.apache.tapestry.engine.ILink} will be created.
      * @param post
-     *            if true, then the link will be used for a post (not a get, i.e., for a HTML form);
-     *            this may affect what information is encoded into the link
+     *            if true, then the link will be used for a post (not a get,
+     *            i.e., for a HTML form); this may affect what information is
+     *            encoded into the link
      * @see PropertyPersistenceStrategySource
      */
 
-    public void addParametersForPersistentProperties(ServiceEncoding encoding, boolean post);
-}
\ No newline at end of file
+    void addParametersForPersistentProperties(ServiceEncoding encoding,
+            boolean post);
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySourceImpl.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySourceImpl.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySourceImpl.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/PropertyPersistenceStrategySourceImpl.java Fri May  5 09:20:58 2006
@@ -25,15 +25,18 @@
 import org.apache.tapestry.engine.ServiceEncoding;
 
 /**
- * Implementation of the <code>tapestry.persist.PropertyPersistenceStrategySource</code> service.
+ * Implementation of the
+ * <code>tapestry.persist.PropertyPersistenceStrategySource</code> service.
  * Allows access to other services, that implement the
  * {@link org.apache.tapestry.record.PropertyPersistenceStrategy} interface.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public class PropertyPersistenceStrategySourceImpl implements PropertyPersistenceStrategySource
+public class PropertyPersistenceStrategySourceImpl implements
+        PropertyPersistenceStrategySource
 {
+
     // Set from tapestry.props.PersistenceStrategy
     private List _contributions;
 
@@ -42,7 +45,7 @@
     public void initializeService()
     {
         Iterator i = _contributions.iterator();
-        while (i.hasNext())
+        while(i.hasNext())
         {
             PropertyPersistenceStrategyContribution c = (PropertyPersistenceStrategyContribution) i
                     .next();
@@ -54,7 +57,8 @@
     public PropertyPersistenceStrategy getStrategy(String name)
     {
         if (!_strategies.containsKey(name))
-            throw new ApplicationRuntimeException(RecordMessages.unknownPersistenceStrategy(name));
+            throw new ApplicationRuntimeException(RecordMessages
+                    .unknownPersistenceStrategy(name));
 
         return (PropertyPersistenceStrategy) _strategies.get(name);
     }
@@ -65,9 +69,10 @@
 
         Iterator i = _strategies.values().iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
-            PropertyPersistenceStrategy s = (PropertyPersistenceStrategy) i.next();
+            PropertyPersistenceStrategy s = (PropertyPersistenceStrategy) i
+                    .next();
 
             result.addAll(s.getStoredChanges(pageName));
         }
@@ -79,21 +84,24 @@
     {
         Iterator i = _strategies.values().iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
-            PropertyPersistenceStrategy s = (PropertyPersistenceStrategy) i.next();
+            PropertyPersistenceStrategy s = (PropertyPersistenceStrategy) i
+                    .next();
 
             s.discardStoredChanges(pageName);
         }
     }
 
-    public void addParametersForPersistentProperties(ServiceEncoding encoding, boolean post)
+    public void addParametersForPersistentProperties(ServiceEncoding encoding,
+            boolean post)
     {
         Iterator i = _strategies.values().iterator();
 
-        while (i.hasNext())
+        while(i.hasNext())
         {
-            PropertyPersistenceStrategy s = (PropertyPersistenceStrategy) i.next();
+            PropertyPersistenceStrategy s = (PropertyPersistenceStrategy) i
+                    .next();
 
             s.addParametersForPersistentProperties(encoding, post);
         }
@@ -103,4 +111,4 @@
     {
         _contributions = contributions;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordMessages.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordMessages.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordMessages.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordMessages.java Fri May  5 09:20:58 2006
@@ -21,24 +21,34 @@
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-class RecordMessages
+final class RecordMessages
 {
-    private final static MessageFormatter _formatter = new MessageFormatter(RecordMessages.class);
+
+    private static final MessageFormatter _formatter = new MessageFormatter(
+            RecordMessages.class);
+
+    /* defeat instantiation */
+    private RecordMessages()
+    {
+    }
 
     static String unknownPersistenceStrategy(String name)
     {
         return _formatter.format("unknown-persistence-strategy", name);
     }
 
-    static String missingPropertySpecification(String propertyName, IComponent component)
+    static String missingPropertySpecification(String propertyName,
+            IComponent component)
     {
-        return _formatter.format("missing-property-specification", propertyName, component
-                .getExtendedId(), component.getSpecification().getSpecificationLocation());
+        return _formatter.format("missing-property-specification",
+                propertyName, component.getExtendedId(), component
+                        .getSpecification().getSpecificationLocation());
     }
 
     static String recorderLocked(String propertyName, IComponent component)
     {
-        return _formatter.format("recorder-locked", propertyName, component.getExtendedId());
+        return _formatter.format("recorder-locked", propertyName, component
+                .getExtendedId());
     }
 
     static String decodeFailure(Throwable cause)
@@ -55,4 +65,4 @@
     {
         return _formatter.format("unknown-prefix", prefix);
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordStrings.properties
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordStrings.properties?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordStrings.properties (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordStrings.properties Fri May  5 09:20:58 2006
@@ -17,4 +17,4 @@
 recorder-locked=Change to persistent property {0} of {1} has been ignored. Persistent properties may only be changed prior to the rendering of the response page.
 decode-failure=An exception occured decoding the MIME data stream: {0}
 encode-failure=An exception occured encoding the data stream into MIME format: {0}
-unknown-prefix=The prefix of the MIME encoded data stream was ''{0}'', it should be ''B'' or ''Z''.
\ No newline at end of file
+unknown-prefix=The prefix of the MIME encoded data stream was ''{0}'', it should be ''B'' or ''Z''.

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordUtils.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordUtils.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordUtils.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/RecordUtils.java Fri May  5 09:20:58 2006
@@ -29,8 +29,11 @@
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public class RecordUtils
+public final class RecordUtils
 {
+    /* defeat instantiation */
+    private RecordUtils() { }
+    
     /**
      * Builds a {@link PropertyChange} instance for the given key and value pulled from the
      * {@link org.apache.tapestry.web.WebSession}.

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/SessionPropertyPersistenceStrategy.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/SessionPropertyPersistenceStrategy.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/SessionPropertyPersistenceStrategy.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/record/SessionPropertyPersistenceStrategy.java Fri May  5 09:20:58 2006
@@ -24,17 +24,20 @@
 import org.apache.tapestry.web.WebSession;
 
 /**
- * The most basic {@link org.apache.tapestry.record.PropertyPersistenceStrategy}, which stores
- * properties in the HttpSession as attributes.
+ * The most basic {@link org.apache.tapestry.record.PropertyPersistenceStrategy},
+ * which stores properties in the HttpSession as attributes.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public class SessionPropertyPersistenceStrategy implements PropertyPersistenceStrategy
+public class SessionPropertyPersistenceStrategy implements
+        PropertyPersistenceStrategy
 {
+
     public static final String STRATEGY_ID = "session";
 
-    // Really, the name of the servlet; used as a prefix on all HttpSessionAttribute keys
+    // Really, the name of the servlet; used as a prefix on all
+    // HttpSessionAttribute keys
     // to keep things straight if multiple Tapestry apps are deployed
     // in the same WAR.
 
@@ -42,19 +45,16 @@
 
     private WebRequest _request;
 
-    public void store(String pageName, String idPath, String propertyName, Object newValue)
+    public void store(String pageName, String idPath, String propertyName,
+            Object newValue)
     {
         Defense.notNull(pageName, "pageName");
         Defense.notNull(propertyName, "propertyName");
 
         WebSession session = _request.getSession(true);
 
-        String attributeName = RecordUtils.buildChangeKey(
-                STRATEGY_ID,
-                _applicationId,
-                pageName,
-                idPath,
-                propertyName);
+        String attributeName = RecordUtils.buildChangeKey(STRATEGY_ID,
+                _applicationId, pageName, idPath, propertyName);
 
         session.setAttribute(attributeName, newValue);
     }
@@ -65,27 +65,24 @@
 
         WebSession session = _request.getSession(false);
 
-        if (session == null)
-            return Collections.EMPTY_LIST;
+        if (session == null) return Collections.EMPTY_LIST;
 
         final Collection result = new ArrayList();
 
         WebSessionAttributeCallback callback = new WebSessionAttributeCallback()
         {
+
             public void handleAttribute(WebSession session, String name)
             {
-                PropertyChange change = RecordUtils.buildChange(name, session.getAttribute(name));
+                PropertyChange change = RecordUtils.buildChange(name, session
+                        .getAttribute(name));
 
                 result.add(change);
             }
         };
 
-        RecordUtils.iterateOverMatchingAttributes(
-                STRATEGY_ID,
-                _applicationId,
-                pageName,
-                session,
-                callback);
+        RecordUtils.iterateOverMatchingAttributes(STRATEGY_ID, _applicationId,
+                pageName, session, callback);
 
         return result;
     }
@@ -94,30 +91,27 @@
     {
         WebSession session = _request.getSession(false);
 
-        if (session == null)
-            return;
+        if (session == null) return;
 
         WebSessionAttributeCallback callback = new WebSessionAttributeCallback()
         {
+
             public void handleAttribute(WebSession session, String name)
             {
                 session.setAttribute(name, null);
             }
         };
 
-        RecordUtils.iterateOverMatchingAttributes(
-                STRATEGY_ID,
-                _applicationId,
-                pageName,
-                session,
-                callback);
+        RecordUtils.iterateOverMatchingAttributes(STRATEGY_ID, _applicationId,
+                pageName, session, callback);
     }
 
     /**
      * Does nothing; session persistence does not make use of query parameters.
      */
 
-    public void addParametersForPersistentProperties(ServiceEncoding encoding, boolean post)
+    public void addParametersForPersistentProperties(ServiceEncoding encoding,
+            boolean post)
     {
     }
 
@@ -130,4 +124,4 @@
     {
         _request = request;
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptMessages.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptMessages.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptMessages.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptMessages.java Fri May  5 09:20:58 2006
@@ -18,30 +18,39 @@
 import org.apache.hivemind.service.ClassFabUtils;
 
 /**
- * Container of static methods to format logging and exception messages, used within the
- * org.apache.tapesty.test package (and a few sub-packages).
+ * Container of static methods to format logging and exception messages, used
+ * within the org.apache.tapesty.test package (and a few sub-packages).
  * <p>
- * Technically, these are messages for the test package, and this class should be called
- * TestMessages ... but that's always a bad idea (it makes the class look like a JUnit test suite).
+ * Technically, these are messages for the test package, and this class should
+ * be called TestMessages ... but that's always a bad idea (it makes the class
+ * look like a JUnit test suite).
  * <p>
- * This class is public, not package private, because some related sub-packages make use of it as
- * well.
+ * This class is public, not package private, because some related sub-packages
+ * make use of it as well.
  * 
  * @author Howard Lewis Ship
  * @since 4.0
  */
-public class ScriptMessages
+public final class ScriptMessages
 {
-    private final static MessageFormatter _formatter = new MessageFormatter(ScriptMessages.class);
+
+    private static final MessageFormatter _formatter = new MessageFormatter(
+            ScriptMessages.class);
+
+    /* defeat instantiation */
+    private ScriptMessages()
+    {
+    }
 
     static String wrongTypeForEnhancement(Class type)
     {
-        return _formatter
-                .format("wrong-type-for-enhancement", ClassFabUtils.getJavaClassName(type));
+        return _formatter.format("wrong-type-for-enhancement", ClassFabUtils
+                .getJavaClassName(type));
     }
 
     static String unableToInstantiate(Class abstractClass, Throwable cause)
     {
-        return _formatter.format("unable-to-instantiate", abstractClass.getName(), cause);
+        return _formatter.format("unable-to-instantiate", abstractClass
+                .getName(), cause);
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptStrings.properties
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptStrings.properties?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptStrings.properties (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/test/ScriptStrings.properties Fri May  5 09:20:58 2006
@@ -13,4 +13,4 @@
 # limitations under the License.
 
 wrong-type-for-enhancement=Can not create instance of {0}. Interfaces, arrays and primitive types may not be enhanced.
-unable-to-instantiate=Unable to instantiate enhanced subclass of {0}: {2}
\ No newline at end of file
+unable-to-instantiate=Unable to instantiate enhanced subclass of {0}: {2}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IPropertyHolder.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IPropertyHolder.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IPropertyHolder.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IPropertyHolder.java Fri May  5 09:20:58 2006
@@ -17,46 +17,41 @@
 import java.util.List;
 
 /**
- *  An interface that defines an object that can store named propertys.  The names
- *  and the properties are Strings.
- *
- *  @author Howard Lewis Ship
- *
- **/
+ * An interface that defines an object that can store named propertys. The names
+ * and the properties are Strings.
+ * 
+ * @author Howard Lewis Ship
+ */
 
 public interface IPropertyHolder
 {
+
     /**
-     *  Returns a List of Strings, the names of all
-     *  properties held by the receiver.  May return an empty list.
-     *  The List is sorted alphabetically.  The List may be modified
-     *  without affecting this property holder.
-     *
-     *  <p>Prior to release 2.2, this method returned Collection.
-     * 
-     **/
+     * Returns a List of Strings, the names of all properties held by the
+     * receiver. May return an empty list. The List is sorted alphabetically.
+     * The List may be modified without affecting this property holder.
+     * <p>
+     * Prior to release 2.2, this method returned Collection.
+     */
 
-    public List getPropertyNames();
+    List getPropertyNames();
 
     /**
-     *  Sets a named property.  The new value replaces the existing value, if any.
-     *  Setting a property to null is the same as removing the property.
-     *
-     **/
+     * Sets a named property. The new value replaces the existing value, if any.
+     * Setting a property to null is the same as removing the property.
+     */
 
-    public void setProperty(String name, String value);
+    void setProperty(String name, String value);
 
     /**
-     *  Removes the named property, if present.
-     *
-     **/
+     * Removes the named property, if present.
+     */
 
-    public void removeProperty(String name);
+    void removeProperty(String name);
 
     /**
-     *  Retrieves the named property, or null if the property is not defined.
-     *
-     **/
+     * Retrieves the named property, or null if the property is not defined.
+     */
 
-    public String getProperty(String name);
-}
\ No newline at end of file
+    String getProperty(String name);
+}

Modified: tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IdAllocator.java
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IdAllocator.java?rev=400102&r1=400101&r2=400102&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IdAllocator.java (original)
+++ tapestry/tapestry4/trunk/framework/src/java/org/apache/tapestry/util/IdAllocator.java Fri May  5 09:20:58 2006
@@ -20,8 +20,9 @@
 import org.apache.hivemind.util.Defense;
 
 /**
- * Used to "uniquify" names within a given context. A base name is passed in, and the return value
- * is the base name, or the base name extended with a suffix to make it unique.
+ * Used to "uniquify" names within a given context. A base name is passed in,
+ * and the return value is the base name, or the base name extended with a
+ * suffix to make it unique.
  * 
  * @author Howard Lewis Ship
  * @since 3.0
@@ -29,14 +30,20 @@
 
 public class IdAllocator
 {
+
     private static final String SEPARATOR = "_";
 
     private final Map _generatorMap = new HashMap();
 
     private final String _namespace;
 
+    /**
+     * 
+     * @author unkonwn
+     */
     private static class NameGenerator
     {
+
         private final String _baseId;
 
         private int _index;
@@ -65,8 +72,8 @@
     }
 
     /**
-     * Allocates the id. Repeated calls for the same name will return "name", "name_0", "name_1",
-     * etc.
+     * Allocates the id. Repeated calls for the same name will return "name",
+     * "name_0", "name_1", etc.
      */
 
     public String allocateId(String name)
@@ -81,13 +88,13 @@
             g = new NameGenerator(key);
             result = key;
         }
-        else
-            result = g.nextId();
+        else result = g.nextId();
 
-        // Handle the degenerate case, where a base name of the form "foo$0" has been
+        // Handle the degenerate case, where a base name of the form "foo$0" has
+        // been
         // requested. Skip over any duplicates thus formed.
 
-        while (_generatorMap.containsKey(result))
+        while(_generatorMap.containsKey(result))
             result = g.nextId();
 
         _generatorMap.put(result, g);
@@ -103,4 +110,4 @@
     {
         _generatorMap.clear();
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org