[Yanel-dev] resource-creator and creation of resource-configuration

simon simon at 333.ch
Sun Jan 10 22:30:45 CET 2010


Michael Wechner schrieb:
> [...]
>>
>>>>
>>>> an other solution would be to delegate the creation of the 
>>>> resource-configuration to the resource. e.g. within CreatableV2 
>>>> introduce a methode createRC(HttpServletRequest request).
>>>
>>> that would probably be the most elegant. I think the CreatableV2 is 
>>> not released yet
>> after thinking some more time i really would prefer a methode 
>> createRC(HttpServletRequest request).
>
> On second thought I do not think the resource itself should be 
> responsible for creating the resource config node, but
> rather the realm or the resource creator (adapter). Even the resource 
> config data/content probably shouldn't be created by
> the resource type itself, because this can be dependent on the realm 
> or the resource creator.
this i don't understand. could you provide an example?
in case the resource-type has a custom config the realm/resource creator 
can not (should not IMHO) know how to create such a config for all 
different resource-types.

>
> Well, I have implemented a resource config map check:
>
> svn ci -m "check resource config map first" 
> src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator/ResourceCreatorResource.java 
>
> Sending        
> src/contributions/resources/resource-creator/src/java/org/wyona/yanel/impl/resources/rescreator/ResourceCreatorResource.java 
>
> Transmitting file data .
> Committed revision 46988.
>
> and now the resource config node should not be created anymore if it 
> already matches within the map.
>
> I have tested it with the from scratch realm and it seems to work 
> fine, but strictly speaking this is not backwards compatible
> and actually this check should be configurable and off by default in 
> order to be really backwards compatible.
>
> Also at the moment only the matching is checked, but not really if the 
> resource types are equal and hence one cannot make
> exceptions to the rule/pattern, whereas I will try to fix this shortly.
>
> Please give it a try and let me know if this works for you.
thanks very much. will try it shortly. i think it should work for me.

simon
>
> Btw, I have also added a TODO re custom config, but this is actually a 
> separate task to enhance.
>
> Thanks
>
> Michi
>
>
>>>
>>> http://www.yanel.org/javadoc/org/wyona/yanel/core/api/attributes/CreatableV2.html 
>>>
>>>
>>> but on the other hand it exists for quite some time now without any 
>>> changes and hence I am afraid
>>> that people consider it realeased ...
>> i'm afraid as well. i would suggest to release CreatableV2 now as it 
>> is. and introduce a new Creatable with the new method. unfortunately 
>> there is already this CreatableV3. i guess it's not possible to 
>> introduce a CreatableV2.1 right?
>>
>> wouldn't it make sense to release the interfaces early and often?
>>
>> cheers
>> simon
>>
>>>
>>> Also we have the still experimental CreatableV3 within the 
>>> contributions folder ....
>>>
>>> Well, we need to discuss this and make some decisions ;-)
>>>
>>> Thanks
>>>
>>> Michi
>>>>
>>>> WDOT?
>>>>
>>>> cheers
>>>> simon
>>>
>>
>



More information about the Yanel-development mailing list