[ 
https://issues.apache.org/jira/browse/SLING-6187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15745626#comment-15745626
 ] 

Justin Edelson commented on SLING-6187:
---------------------------------------

[~bdelacretaz] I'm not comfortable adding a delimiter to the operation name 
since we've never said that you can't put a + (or any other character) in an 
operation name. I would be OK with a new parameter 
{{requiredPostProcessorProfile}} whose value corresponds to the configuration 
object you're suggesting. WDYT?

[~fmeschbe] the use case is laid out in the issue description -- a POST request 
may depend upon the presence of one or more post processors. Currently, if 
these post processors are not present, there is no way for the client to ensure 
that the request is handled properly and this issue is about allowing the 
client to make assertions about the way the request is handled. Keying this off 
of resource type or node types won't work because this isn't about the target 
resource, it is about the POST request itself. Two different POSTs to the same 
resource (even with the same operation) may have a different set of expected 
post processors.

>From my perspective, no additional implementation detail is leaked -- this is 
>no different than the extant {{:operation}} parameter. Just like we fail if 
>the {{:operation}} is not present, we should fail if there is a required post 
>processor which isn't present. I fail to see the difference.

I have reverted the commit for now while I look at implementing the profile 
("flavor" implies that post processors are tied to operations when they are 
orthogonal) suggestion from [~bdelacretaz]. IMHO, it appears at first glance to 
be adding significantly more complexity than is warranted. But if that is what 
is needed to obtain consensus, so be it.

> Provide a way for a POST request to assert a set of required 
> SlingPostProcessors
> --------------------------------------------------------------------------------
>
>                 Key: SLING-6187
>                 URL: https://issues.apache.org/jira/browse/SLING-6187
>             Project: Sling
>          Issue Type: Improvement
>          Components: Servlets
>            Reporter: Justin Edelson
>            Assignee: Justin Edelson
>             Fix For: Servlets Post 2.3.16
>
>         Attachments: SLING-6187.patch
>
>
> I would like to add support for a new "special" request parameter understood 
> by the Sling Post Servlet named {{:requiredPostProcessors}}. This parameter 
> may contain a comma-delimited list of names (see below) which *must* be 
> available *at the time the request is processed* in order for the request to 
> be handled. Whether or not those processors _do_ anything or whether the 
> request succeeds or not is a separate question; this is just a preflight 
> check if you will.
> If any of the required SlingPostProcessors are not available, the request 
> will fail with a 501 error.
> The name of a SlingPostProcessor will be defined by a newly defined service 
> registration property {{postProcessor.name}} and default to the simple name 
> of the SlingPostProcessor's implementation class if that property is not 
> defined.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to