hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahue...@apache.org
Subject svn commit: r505516 - in /hivemind/hivemind2/trunk/annotations/src: java/org/apache/hivemind/annotations/ java/org/apache/hivemind/annotations/definition/ java/org/apache/hivemind/annotations/internal/ test/org/apache/hivemind/annotations/
Date Fri, 09 Feb 2007 21:51:16 GMT
Author: ahuegen
Date: Fri Feb  9 13:51:14 2007
New Revision: 505516

URL: http://svn.apache.org/viewvc?view=rev&rev=505516
Log:
Annotations moved to definition package.

Added:
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/TypedRegistry.java
      - copied, changed from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Registry.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Configuration.java
      - copied, changed from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Configuration.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Contribution.java
      - copied, changed from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Contribution.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Module.java
      - copied, changed from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Module.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Service.java
      - copied, changed from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Service.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Submodule.java
      - copied, changed from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Submodule.java
Removed:
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Configuration.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Contribution.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Module.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Registry.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Service.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Submodule.java
Modified:
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/AbstractAnnotatedModule.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/FactoryMethodImplementationConstructor.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/ModuleInstanceProviderImpl.java
    hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/RegistryImpl.java
    hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/AutowiringModule.java
    hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/ModuleWithExplicitId.java
    hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/SimpleAnnotatedModule.java
    hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Submodule1.java
    hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Supermodule.java

Modified: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/AbstractAnnotatedModule.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/AbstractAnnotatedModule.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/AbstractAnnotatedModule.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/AbstractAnnotatedModule.java
Fri Feb  9 13:51:14 2007
@@ -4,22 +4,25 @@
 
 /**
  * Ancestor for annotated module classes. Provides convenience methods
- * for the access to {@link Registry} and {@link Autowiring}.
+ * for the access to {@link TypedRegistry} and {@link Autowiring}.
  * 
  * @author Achim Huegen
  */
 public class AbstractAnnotatedModule
 {
-    private Registry _registry;
+    private TypedRegistry _typedRegistry;
 
-    public Registry getRegistry()
+    /**
+     * @return  the registry the module is loaded in
+     */
+    public TypedRegistry getRegistry()
     {
-        return _registry;
+        return _typedRegistry;
     }
 
-    public void setRegistry(Registry registry)
+    public void setRegistry(TypedRegistry typedRegistry)
     {
-        _registry = registry;
+        _typedRegistry = typedRegistry;
     }
     
     /**
@@ -27,7 +30,7 @@
      */
     public Autowiring getAutowiring()
     {
-        return _registry.getAutowiring();
+        return _typedRegistry.getAutowiring();
     }
     
     /**
@@ -38,6 +41,48 @@
     public <T> T autowireProperties(T target) 
     {
         return (T) getAutowiring().autowireProperties(target);
+    }
+    
+    /**
+     * Returns a service from the registry.
+     * 
+     * @see org.apache.hivemind.Registry#getService(String, Class)
+     */
+    public <T> T getService(String serviceId, Class<T> serviceInterface)
+    {
+        return _typedRegistry.getService(serviceId, serviceInterface);
+    }
+
+    /**
+     * Finds a service that implements the provided interface. 
+     * Exactly one such service may exist or an exception is thrown.
+     * 
+     * @see org.apache.hivemind.Registry#getService(Class)
+     */
+    public <T> T getService(Class<T> serviceInterface)
+    {
+        return _typedRegistry.getService(serviceInterface);
+    }
+    
+    /**
+     * Returns the specified configuration from the registry.
+     * 
+     * @see org.apache.hivemind.Registry#getConfiguration(String)
+     */
+    public <T> T getConfiguration(String configurationId, Class<T> configurationType)
+    {
+        return _typedRegistry.getConfiguration(configurationId, configurationType);
+    }
+    
+    /**
+     * Finds a configuration by its type. 
+     * Exactly one such configuration may exist or an exception is thrown.
+     * 
+     * @see org.apache.hivemind.Registry#getConfiguration(String)
+     */
+    public <T> T getConfiguration(Class<T> configurationType)
+    {
+        return _typedRegistry.getConfiguration(configurationType);
     }
 
 }

Copied: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/TypedRegistry.java
(from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Registry.java)
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/TypedRegistry.java?view=diff&rev=505516&p1=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Registry.java&r1=505487&p2=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/TypedRegistry.java&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Registry.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/TypedRegistry.java
Fri Feb  9 13:51:14 2007
@@ -8,7 +8,7 @@
  * 
  * @author Achim Huegen
  */
-public interface Registry 
+public interface TypedRegistry 
 {
     /**
      * Returns a service from the registry.
@@ -40,13 +40,7 @@
      */
     public <T> T getConfiguration(Class<T> configurationType);
     
-    /**
-     * Returns the specified configuration from the registry. The result is untyped.
-     * 
-     * @see org.apache.hivemind.Registry#getConfiguration(String)
-     */
-    public Object getConfiguration(String configurationId);
-    
+
     /**
      * Returns a reference to the {@link Autowiring} service.
      */

Copied: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Configuration.java
(from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Configuration.java)
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Configuration.java?view=diff&rev=505516&p1=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Configuration.java&r1=505487&p2=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Configuration.java&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Configuration.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Configuration.java
Fri Feb  9 13:51:14 2007
@@ -1,4 +1,4 @@
-package org.apache.hivemind.annotations;
+package org.apache.hivemind.annotations.definition;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;

Copied: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Contribution.java
(from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Contribution.java)
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Contribution.java?view=diff&rev=505516&p1=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Contribution.java&r1=505487&p2=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Contribution.java&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Contribution.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Contribution.java
Fri Feb  9 13:51:14 2007
@@ -1,4 +1,4 @@
-package org.apache.hivemind.annotations;
+package org.apache.hivemind.annotations.definition;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;

Copied: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Module.java
(from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Module.java)
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Module.java?view=diff&rev=505516&p1=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Module.java&r1=505487&p2=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Module.java&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Module.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Module.java
Fri Feb  9 13:51:14 2007
@@ -1,4 +1,4 @@
-package org.apache.hivemind.annotations;
+package org.apache.hivemind.annotations.definition;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;

Copied: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Service.java
(from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Service.java)
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Service.java?view=diff&rev=505516&p1=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Service.java&r1=505487&p2=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Service.java&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Service.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Service.java
Fri Feb  9 13:51:14 2007
@@ -1,4 +1,4 @@
-package org.apache.hivemind.annotations;
+package org.apache.hivemind.annotations.definition;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;

Copied: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Submodule.java
(from r505487, hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Submodule.java)
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Submodule.java?view=diff&rev=505516&p1=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Submodule.java&r1=505487&p2=hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Submodule.java&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/Submodule.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/definition/Submodule.java
Fri Feb  9 13:51:14 2007
@@ -1,4 +1,4 @@
-package org.apache.hivemind.annotations;
+package org.apache.hivemind.annotations.definition;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;

Modified: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/AnnotatedModuleProcessor.java
Fri Feb  9 13:51:14 2007
@@ -9,10 +9,10 @@
 import org.apache.hivemind.ErrorHandler;
 import org.apache.hivemind.Location;
 import org.apache.hivemind.Resource;
-import org.apache.hivemind.annotations.Configuration;
-import org.apache.hivemind.annotations.Module;
-import org.apache.hivemind.annotations.Service;
-import org.apache.hivemind.annotations.Submodule;
+import org.apache.hivemind.annotations.definition.Configuration;
+import org.apache.hivemind.annotations.definition.Module;
+import org.apache.hivemind.annotations.definition.Service;
+import org.apache.hivemind.annotations.definition.Submodule;
 import org.apache.hivemind.definition.Contribution;
 import org.apache.hivemind.definition.ImplementationConstructor;
 import org.apache.hivemind.definition.ImplementationDefinition;
@@ -122,11 +122,11 @@
                         module,
                         instanceProvider);
             }
-            else if (org.apache.hivemind.annotations.Contribution.class.equals(annotation.annotationType()))
+            else if (org.apache.hivemind.annotations.definition.Contribution.class.equals(annotation.annotationType()))
             {
                 processAnnotatedContributionMethod(
                         method,
-                        (org.apache.hivemind.annotations.Contribution) annotation,
+                        (org.apache.hivemind.annotations.definition.Contribution) annotation,
                         module,
                         instanceProvider);
             }
@@ -188,7 +188,7 @@
         cpd.addContribution(cd);
     }
 
-    private void processAnnotatedContributionMethod(Method method, org.apache.hivemind.annotations.Contribution
contribution, ModuleDefinitionImpl module, ModuleInstanceProvider instanceProvider)
+    private void processAnnotatedContributionMethod(Method method, org.apache.hivemind.annotations.definition.Contribution
contribution, ModuleDefinitionImpl module, ModuleInstanceProvider instanceProvider)
     {
         if (_log.isDebugEnabled())
         {

Modified: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/FactoryMethodImplementationConstructor.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/FactoryMethodImplementationConstructor.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/FactoryMethodImplementationConstructor.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/FactoryMethodImplementationConstructor.java
Fri Feb  9 13:51:14 2007
@@ -4,7 +4,7 @@
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.Location;
-import org.apache.hivemind.annotations.Service;
+import org.apache.hivemind.annotations.definition.Service;
 import org.apache.hivemind.definition.ImplementationConstructionContext;
 import org.apache.hivemind.definition.ImplementationConstructor;
 import org.apache.hivemind.internal.AbstractServiceImplementationConstructor;

Modified: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/ModuleInstanceProviderImpl.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/ModuleInstanceProviderImpl.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/ModuleInstanceProviderImpl.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/ModuleInstanceProviderImpl.java
Fri Feb  9 13:51:14 2007
@@ -1,7 +1,7 @@
 package org.apache.hivemind.annotations.internal;
 
 import org.apache.hivemind.ApplicationRuntimeException;
-import org.apache.hivemind.annotations.Registry;
+import org.apache.hivemind.annotations.TypedRegistry;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.RegistryInfrastructure;
 import org.apache.hivemind.util.Defense;
@@ -52,10 +52,10 @@
     private void injectRegistry(Object moduleInstance, RegistryInfrastructure _registry)
     {
         if (PropertyUtils.isWritable(moduleInstance, REGISTRY_PROPERTY_NAME) 
-                && PropertyUtils.getPropertyType(moduleInstance, REGISTRY_PROPERTY_NAME).equals(Registry.class))
{
+                && PropertyUtils.getPropertyType(moduleInstance, REGISTRY_PROPERTY_NAME).equals(TypedRegistry.class))
{
             
             Module callingModule = _registry.getModule(_moduleId);
-            Registry annotatedRegistry = new RegistryImpl(callingModule, _registry);
+            TypedRegistry annotatedRegistry = new RegistryImpl(callingModule, _registry);
             PropertyUtils.write(moduleInstance, REGISTRY_PROPERTY_NAME, annotatedRegistry);
         }
     }

Modified: hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/RegistryImpl.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/RegistryImpl.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/RegistryImpl.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/java/org/apache/hivemind/annotations/internal/RegistryImpl.java
Fri Feb  9 13:51:14 2007
@@ -1,18 +1,18 @@
 package org.apache.hivemind.annotations.internal;
 
-import org.apache.hivemind.annotations.Registry;
+import org.apache.hivemind.annotations.TypedRegistry;
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.RegistryInfrastructure;
 import org.apache.hivemind.service.Autowiring;
 import org.apache.hivemind.util.IdUtils;
 
 /**
- * Implementation of {@link Registry}.
+ * Implementation of {@link TypedRegistry}.
  * Wraps an instance of {@link RegistryInfrastructure} to provide registry access.
  * 
  * @author Huegen
  */
-public class RegistryImpl implements Registry
+public class RegistryImpl implements TypedRegistry
 {
     private Module _callingModule;
 
@@ -30,7 +30,7 @@
     }
 
     /**
-     * @see org.apache.hivemind.annotations.Registry#getConfiguration(java.lang.String, java.lang.Class)
+     * @see org.apache.hivemind.annotations.TypedRegistry#getConfiguration(java.lang.String,
java.lang.Class)
      */
     public <T> T getConfiguration(String configurationId, Class<T> configurationType)
     {
@@ -44,7 +44,7 @@
     }
 
     /**
-     * @see org.apache.hivemind.annotations.Registry#getConfiguration(java.lang.Class)
+     * @see org.apache.hivemind.annotations.TypedRegistry#getConfiguration(java.lang.Class)
      */
     public <T> T getConfiguration(Class<T> configurationType)
     {
@@ -53,18 +53,7 @@
     }
 
     /**
-     * @see org.apache.hivemind.annotations.Registry#getConfiguration(java.lang.String)
-     */
-    public Object getConfiguration(String configurationId)
-    {
-        String qualifiedConfigurationId = IdUtils.qualify(
-                _callingModule.getModuleId(),
-                configurationId);
-        return _delegate.getConfiguration(qualifiedConfigurationId, _callingModule);
-    }
-
-    /**
-     * @see org.apache.hivemind.annotations.Registry#getService(java.lang.String, java.lang.Class)
+     * @see org.apache.hivemind.annotations.TypedRegistry#getService(java.lang.String, java.lang.Class)
      */
     public <T> T getService(String serviceId, Class<T> serviceInterface)
     {
@@ -76,7 +65,7 @@
     }
 
     /**
-     * @see org.apache.hivemind.annotations.Registry#getService(java.lang.Class)
+     * @see org.apache.hivemind.annotations.TypedRegistry#getService(java.lang.Class)
      */
     public <T> T getService(Class<T> serviceInterface)
     {
@@ -85,7 +74,7 @@
     }
 
     /**
-     * @see org.apache.hivemind.annotations.Registry#getAutowiring()
+     * @see org.apache.hivemind.annotations.TypedRegistry#getAutowiring()
      */
     public Autowiring getAutowiring()
     {

Modified: hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/AutowiringModule.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/AutowiringModule.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/AutowiringModule.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/AutowiringModule.java
Fri Feb  9 13:51:14 2007
@@ -1,5 +1,7 @@
 package org.apache.hivemind.annotations;
 
+import org.apache.hivemind.annotations.definition.Service;
+
 import hivemind.test.services.ServiceAutowireTarget;
 import hivemind.test.services.StringHolder;
 import hivemind.test.services.impl.StringHolderImpl;

Modified: hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/ModuleWithExplicitId.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/ModuleWithExplicitId.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/ModuleWithExplicitId.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/ModuleWithExplicitId.java
Fri Feb  9 13:51:14 2007
@@ -1,5 +1,7 @@
 package org.apache.hivemind.annotations;
 
+import org.apache.hivemind.annotations.definition.Module;
+
 @Module(id = "Test")
 public class ModuleWithExplicitId
 {

Modified: hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/SimpleAnnotatedModule.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/SimpleAnnotatedModule.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/SimpleAnnotatedModule.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/SimpleAnnotatedModule.java
Fri Feb  9 13:51:14 2007
@@ -6,6 +6,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.hivemind.annotations.definition.Configuration;
+import org.apache.hivemind.annotations.definition.Contribution;
+import org.apache.hivemind.annotations.definition.Service;
+
 public class SimpleAnnotatedModule extends AbstractAnnotatedModule
 {
     @Service(id = "Test")
@@ -16,17 +20,17 @@
 
             public void run()
             {
-                List<String> demoList = (List<String>) getRegistry().getConfiguration("Demo",
List.class);
+                List<String> demoList = (List<String>) getConfiguration("Demo",
List.class);
                 for (String entry : demoList)
                 {
                     System.out.println(entry);
                 }
-                String one = (String) getRegistry().getConfiguration("SingleElement", String.class);
+                String one = (String) getConfiguration("SingleElement", String.class);
                 System.out.println(one);
-                StringHolderImpl holder = (StringHolderImpl) getRegistry().getConfiguration("StringHolder",
StringHolderImpl.class);
+                StringHolderImpl holder = (StringHolderImpl) getConfiguration("StringHolder",
StringHolderImpl.class);
                 System.out.println(holder.getValue());
                 
-                StringHolderImpl holderService = (StringHolderImpl) getRegistry().getService("StringHolder",
StringHolderImpl.class);
+                StringHolderImpl holderService = (StringHolderImpl) getService("StringHolder",
StringHolderImpl.class);
                 System.out.println(holderService.getValue());
             }
         };

Modified: hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Submodule1.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Submodule1.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Submodule1.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Submodule1.java
Fri Feb  9 13:51:14 2007
@@ -1,5 +1,8 @@
 package org.apache.hivemind.annotations;
 
+import org.apache.hivemind.annotations.definition.Module;
+import org.apache.hivemind.annotations.definition.Service;
+
 import hivemind.test.services.impl.StringHolderImpl;
 
 @Module(id = "theSubModule")

Modified: hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Supermodule.java
URL: http://svn.apache.org/viewvc/hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Supermodule.java?view=diff&rev=505516&r1=505515&r2=505516
==============================================================================
--- hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Supermodule.java
(original)
+++ hivemind/hivemind2/trunk/annotations/src/test/org/apache/hivemind/annotations/Supermodule.java
Fri Feb  9 13:51:14 2007
@@ -1,5 +1,8 @@
 package org.apache.hivemind.annotations;
 
+import org.apache.hivemind.annotations.definition.Module;
+import org.apache.hivemind.annotations.definition.Submodule;
+
 @Module(id = "super")
 public class Supermodule extends AbstractAnnotatedModule
 {



Mime
View raw message