You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by James Carman <ja...@carmanconsulting.com> on 2006/11/07 16:54:59 UTC

Re: [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen

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 <wi...@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.
>
> -
> -
>

Re: [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen

Posted by James Carman <ja...@carmanconsulting.com>.
I mean the root-container-class.  What if it's not instantiatable?


On 11/7/06, Achim Hügen <ac...@gmx.de> wrote:
> James Carman schrieb:
> > What if the complex type isn't instantiatable?  What if the only way
> > to instantiate it is via a factory method?
> What do you mean with 'not instantiatable'? Why?
> The getFactoryConfig() can call a service or whatever
> you can think of to create an instance of the container.
>
> Achim
> >
> >
> > On 11/7/06, Apache Wiki <wi...@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.
> >>
> >> -
> >> -
> >>
> >
> >
>
>

Re: [Jakarta-hivemind Wiki] Update of "NewAndNoteworthyFeaturesInAnnotationBranch" by AchimHuegen

Posted by Achim Hügen <ac...@gmx.de>.
James Carman schrieb:
> What if the complex type isn't instantiatable?  What if the only way
> to instantiate it is via a factory method?
What do you mean with 'not instantiatable'? Why?
The getFactoryConfig() can call a service or whatever
you can think of to create an instance of the container.

Achim
>
>
> On 11/7/06, Apache Wiki <wi...@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.
>>
>> -
>> -
>>
>
>