Isn't it worth to introduce that hook into the POST servlet?
The default operations are hard/impossible to inherit and change. It
would be nice to have the ability to do some composition and add code
around the operations.
The postprocessor is already there so it's just the preprocessor that
is missing.
That allows to not misuse other extension points like the
namegenerator to check/setup preconditions for an operation to
succeed.

I have very good experience with frameworks that allow
decorators/interceptors on existing services.

As a side node: Why do the sling operations not use the same hooks the
external operations use? Wouldn't that be more consistent?
I see that there are some operations that need more parameters in
their constructor (modifyoperation), but doesn't that mean that the
interface for operations is not powerful enough at the moment?

Regards,
 Markus

On Fri, Jan 21, 2011 at 5:11 PM, Justin Edelson <[email protected]> wrote:
> On 1/21/11 11:06 AM, Markus Joschko wrote:
>>> You could create the folder node inside your NodeNameGenerator. This is
>>> a bit more code, but would allow you full control over how the folder is
>>> created (which it sounds like what you want).
>>
>> Ok, this is perfect then. Maybe I am a bit pedantic but is
>> NodeNameGenerator the right place to do such stuff?
>> It sounds like it is not meant to be used in that way.
>
> I agree that this wasn't the intent. But the post servlet does not have
> a mechanism to specify node types for intermediate nodes which are
> automatically created.
>
> Alternatively, you could write a PostProcessor which uses setPrimaryType
> to change the primary type from sling:Folder to whatever your custom
> folder type is, but this seems wrong too for some reason.
>
> Justin
>

Reply via email to