Author: jboynes
Date: Sun Apr 16 09:56:12 2006
New Revision: 394511

URL: http://svn.apache.org/viewcvs?rev=394511&view=rev
Log:
refactor to make autowire maps private

Modified:
    
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/impl/AbstractCompositeContext.java
    
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemCompositeContextImpl.java

Modified: 
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/impl/AbstractCompositeContext.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/impl/AbstractCompositeContext.java?rev=394511&r1=394510&r2=394511&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/impl/AbstractCompositeContext.java
 (original)
+++ 
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/context/impl/AbstractCompositeContext.java
 Sun Apr 16 09:56:12 2006
@@ -105,8 +105,8 @@
     protected boolean initialized;
 
     // a mapping of service type to component name
-    protected Map<Class, NameToScope> autowireInternal = new 
ConcurrentHashMap<Class, NameToScope>();
-    protected Map<Class, NameToScope> autowireExternal = new 
ConcurrentHashMap<Class, NameToScope>();
+    private final Map<Class, NameToScope> autowireInternal = new 
ConcurrentHashMap<Class, NameToScope>();
+    private final Map<Class, NameToScope> autowireExternal = new 
ConcurrentHashMap<Class, NameToScope>();
 
     @Autowire(required = false)
     private AutowireContext autowireContext;
@@ -711,7 +711,7 @@
         }
     }
 
-    private void registerAutowireInternal(Class<?> interfaze, String name, 
ScopeContext scopeContext) {
+    protected void registerAutowireInternal(Class<?> interfaze, String name, 
ScopeContext scopeContext) {
         assert interfaze != null;
         if (autowireInternal.containsKey(interfaze)) {
             return;
@@ -731,7 +731,7 @@
         }
     }
 
-    private void registerAutowireExternal(Class<?> interfaze, String name, 
ScopeContext scopeContext) {
+    protected void registerAutowireExternal(Class<?> interfaze, String name, 
ScopeContext scopeContext) {
         assert interfaze != null;
         if (autowireExternal.containsKey(interfaze)) {
             return;

Modified: 
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemCompositeContextImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemCompositeContextImpl.java?rev=394511&r1=394510&r2=394511&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemCompositeContextImpl.java
 (original)
+++ 
incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/system/context/SystemCompositeContextImpl.java
 Sun Apr 16 09:56:12 2006
@@ -24,7 +24,6 @@
 import org.apache.tuscany.core.context.CompositeContext;
 import org.apache.tuscany.core.context.ConfigurationContext;
 import org.apache.tuscany.core.context.EventContext;
-import org.apache.tuscany.core.context.QualifiedName;
 import org.apache.tuscany.core.context.ScopeContext;
 import org.apache.tuscany.core.context.ScopeStrategy;
 import org.apache.tuscany.core.context.SystemCompositeContext;
@@ -70,8 +69,7 @@
         SystemObjectContextFactory configuration = new 
SystemObjectContextFactory(componentName, instance);
         registerConfiguration(configuration);
         ScopeContext scope = scopeContexts.get(configuration.getScope());
-        NameToScope mapping = new NameToScope(new 
QualifiedName(componentName), scope);
-        autowireInternal.put(service, mapping);
+        registerAutowireInternal(service, componentName, scope);
     }
 
     // FIXME These should be removed and configured


Reply via email to