I don't think so, the signature of the ResourceResolver#create method is already: create(Resource parent, String name, Map<String, Object> props), so what should a generic method in ResourceUtil do in addition? Looking at my proposal, the only thing the ResourceCollectionUtil method would do is making sure the correct resource type is set in the props, so maybe it's not worth it at all to have such an utility
Carsten 2013/5/9 Alexander Klimetschek <aklim...@adobe.com> > On 09.05.2013, at 10:59, Carsten Ziegeler <cziege...@apache.org> wrote: > > > I took me some time to fully grasp this proposal :) (although it's pretty > > simple). > > > > Yes, I'm fine with removing the service + impl completely. What about > > having a util class like > > ResourceCollectionUtil.create(Resource parent, String name, Map<String, > > Object> optionalProperties) ? > > Wouldn't that be more like a generic ResourceUtil.create()? Including the > resource type (optionally): > > ResourceUtil.create(Resource parent, String name, Map<String, Object> > optionalProperties) > ResourceUtil.create(Resource parent, String name, String resourceType, > Map<String, Object> optionalProperties) > > This requires you to set the right resource type, but that's easy: > > ResourceUtil.create(parent, "collection", > ResourceCollection.RESOURCE_TYPE, props) > > Cheers, > Alex > > -- Carsten Ziegeler cziege...@apache.org