cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r451888 - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel: WidgetDefinitionBuilderContext.java library/Library.java library/LibraryManagerImpl.java
Date Mon, 02 Oct 2006 06:25:29 GMT
Author: vgritsenko
Date: Sun Oct  1 23:25:29 2006
New Revision: 451888

URL: http://svn.apache.org/viewvc?view=rev&rev=451888
Log:
tweaks

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilderContext.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/Library.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/LibraryManagerImpl.java

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilderContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilderContext.java?view=diff&rev=451888&r1=451887&r2=451888
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilderContext.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilderContext.java
Sun Oct  1 23:25:29 2006
@@ -30,8 +30,6 @@
 
 
     public WidgetDefinitionBuilderContext() {
-        this.superDefinition = null;
-        this.localLibrary = null;
     }
 
     public WidgetDefinitionBuilderContext(WidgetDefinitionBuilderContext other) {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/Library.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/Library.java?view=diff&rev=451888&r1=451887&r2=451888
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/Library.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/Library.java
Sun Oct  1 23:25:29 2006
@@ -35,6 +35,8 @@
 import org.w3c.dom.Element;
 
 /**
+ * Form model library.
+ *
  * @version $Id$
  */
 public class Library extends AbstractLogEnabled {
@@ -52,16 +54,17 @@
     protected Map inclusions = new HashMap();
 
     // shared object with dependencies
-    protected Object shared = new Object();
+    protected final Object shared = new Object();
 
     protected String sourceURI;
     protected WidgetDefinitionBuilderContext context;
 
 
-    public Library(LibraryManager lm) {
+    public Library(LibraryManager lm, ServiceSelector builderSelector) {
         manager = lm;
         context = new WidgetDefinitionBuilderContext();
         context.setLocalLibrary(this);
+        widgetDefinitionBuilderSelector = builderSelector;
     }
 
     public void setSourceURI(String uri) {
@@ -72,10 +75,6 @@
         return sourceURI;
     }
 
-    public void setWidgetDefinitionBuilderSelector(ServiceSelector selector) {
-        this.widgetDefinitionBuilderSelector = selector;
-    }
-
     public boolean dependenciesHaveChanged() throws LibraryException {
         Iterator i = this.inclusions.values().iterator();
         while (i.hasNext()) {
@@ -191,9 +190,9 @@
     /**
      * Encapsulates a uri to designate an import plus a timestamp so previously reloaded
      */
-    public class Dependency {
-        private String dependencyURI;
-        private Object shared;
+    protected class Dependency {
+        private final String dependencyURI;
+        private final Object shared;
 
         public Dependency(String dependencySourceURI) throws LibraryException {
             this.dependencyURI = dependencySourceURI;

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/LibraryManagerImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/LibraryManagerImpl.java?view=diff&rev=451888&r1=451887&r2=451888
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/LibraryManagerImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/library/LibraryManagerImpl.java
Sun Oct  1 23:25:29 2006
@@ -184,10 +184,8 @@
     }
 
     public Library newLibrary() {
-        Library lib = new Library(this);
+        Library lib = new Library(this, widgetDefinitionBuilderSelector);
         lib.enableLogging(getLogger());
-        lib.setWidgetDefinitionBuilderSelector(this.widgetDefinitionBuilderSelector);
-
         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Created a new library: " + lib);
         }



Mime
View raw message