hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen
Date Tue, 07 Nov 2006 15:51:54 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-hivemind Wiki" for change
notification.

The following page has been changed by AchimHuegen:
http://wiki.apache.org/jakarta-hivemind/NewAndNoteworthyFeaturesInAnnotationBranch

------------------------------------------------------------------------------
  The container object is passed around to the different contributions which can add new
  data to it.
  
- Example for a map based configuration:
+ Example of a map based configuration:
  {{{
    @Configuration(id = "FactoryConfig")
    public Map getFactoryConfig()
@@ -153, +153 @@

      container.put("map", "java.util.HashMap");
      container.put("collection", "java.util.ArrayList");
      container.put("inputStream", "java.io.ByteArrayInputStream");
+   }
+ }}}
+ 
+ Example of a complex configuration object:
+ {{{
+   @Configuration(id = "strutsModule")
+   public ModuleConfig getStrutsModule()
+   {
+     return new ModuleConfigImpl();
+   }
+ 
+   @Contribution(configuration-id = "strutsModule")
+   public void contributeToStrutsModule(ModuleConfig config)
+   {
+     config.addActionConfig(new ActionConfig());
+     config.addFormBeanConfig(new MyFormBeanConfig());
    }
  }}}
  
@@ -192, +208 @@

  It's mainly used to retain backward compatibility. Certain configurations are defined
  in the core framework now which knows nothing about schemas.
  
- 
- 

Mime
View raw message