hivemind-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen
Date Tue, 07 Nov 2006 15:54:59 GMT
What if the complex type isn't instantiatable?  What if the only way
to instantiate it is via a factory method?


On 11/7/06, Apache Wiki <wikidiffs@apache.org> wrote:
> 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