cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r932906 - in /cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2: CayenneProjectModule.java ConfigurationNodeParentGetter.java Project.java
Date Sun, 11 Apr 2010 13:58:30 GMT
Author: aadamchik
Date: Sun Apr 11 13:58:30 2010
New Revision: 932906

URL: http://svn.apache.org/viewvc?rev=932906&view=rev
Log:
minor cleanup

Modified:
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/CayenneProjectModule.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/ConfigurationNodeParentGetter.java
    cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/Project.java

Modified: cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/CayenneProjectModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/CayenneProjectModule.java?rev=932906&r1=932905&r2=932906&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/CayenneProjectModule.java
(original)
+++ cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/CayenneProjectModule.java
Sun Apr 11 13:58:30 2010
@@ -40,7 +40,9 @@ public class CayenneProjectModule implem
         binder.bind(ProjectSaver.class).to(FileProjectSaver.class).in(Scopes.SINGLETON);
         binder.bind(ProjectUpgrader.class).to(ProjectUpgrader_V6.class).in(
                 Scopes.SINGLETON);
-        binder.bind(ProjectValidator.class).to(DefaultProjectValidator.class).in(Scopes.SINGLETON);
-        binder.bind(ConfigurationNodeParentGetter.class).to(DefaultConfigurationNodeParentGetter.class).in(Scopes.SINGLETON);
+        binder.bind(ProjectValidator.class).to(DefaultProjectValidator.class).in(
+                Scopes.SINGLETON);
+        binder.bind(ConfigurationNodeParentGetter.class).to(
+                DefaultConfigurationNodeParentGetter.class).in(Scopes.SINGLETON);
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/ConfigurationNodeParentGetter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/ConfigurationNodeParentGetter.java?rev=932906&r1=932905&r2=932906&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/ConfigurationNodeParentGetter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/ConfigurationNodeParentGetter.java
Sun Apr 11 13:58:30 2010
@@ -20,6 +20,11 @@ package org.apache.cayenne.project2;
 
 import org.apache.cayenne.configuration.ConfigurationNode;
 
+/**
+ * A service to retrieve parents of configuration nodes.
+ * 
+ * @since 3.1
+ */
 public interface ConfigurationNodeParentGetter {
 
     ConfigurationNode getParent(ConfigurationNode node);

Modified: cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/Project.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/Project.java?rev=932906&r1=932905&r2=932906&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/Project.java
(original)
+++ cayenne/main/trunk/framework/cayenne-project-unpublished/src/main/java/org/apache/cayenne/project2/Project.java
Sun Apr 11 13:58:30 2010
@@ -19,10 +19,10 @@
 package org.apache.cayenne.project2;
 
 import org.apache.cayenne.configuration.ConfigurationNode;
+import org.apache.cayenne.configuration.ConfigurationNodeVisitor;
 import org.apache.cayenne.configuration.ConfigurationTree;
 import org.apache.cayenne.resource.Resource;
 
-
 /**
  * A model of a Cayenne mapping project. A project consists of descriptors for
  * DataChannel, DataNodes and DataMaps and associated filesystem files they are loaded
@@ -36,16 +36,15 @@ import org.apache.cayenne.resource.Resou
 public class Project {
 
     protected boolean modified;
-    
-    protected ConfigurationTree<?> configurationTree;
-    private ConfigurationSourceGetter configurationSourceGetter;
 
+    protected ConfigurationTree<?> configurationTree;
+    private ConfigurationNodeVisitor<Resource> configurationSourceGetter;
 
     public Project(ConfigurationTree<?> configurationTree) {
         this.configurationTree = configurationTree;
         this.configurationSourceGetter = new ConfigurationSourceGetter();
     }
-    
+
     public ConfigurationTree<?> getConfigurationTree() {
         return configurationTree;
     }
@@ -53,7 +52,7 @@ public class Project {
     public ConfigurationNode getRootNode() {
         return configurationTree.getRootNode();
     }
-    
+
     /**
      * Returns <code>true</code> if the project is modified.
      */
@@ -67,12 +66,12 @@ public class Project {
     public void setModified(boolean modified) {
         this.modified = modified;
     }
-    
+
     public Resource getConfigurationResource(ConfigurationNode configNode) {
         return configNode.acceptVisitor(configurationSourceGetter);
     }
-    
-    public  Resource getConfigurationResource() {
+
+    public Resource getConfigurationResource() {
         return configurationTree.getRootNode().acceptVisitor(configurationSourceGetter);
     }
 }



Mime
View raw message