Any feedback on the proposed approach below? Chetan Mehrotra
On Mon, Mar 24, 2014 at 4:49 PM, Chetan Mehrotra <chetan.mehro...@gmail.com> wrote: > Hi, > > At times we have a requirement to extend the logic of Sling Post > Servlet and do some pre-processing and then continue with the default > behavior of PostServlet. > > For example if the POST request is modifying some content and we need > to change the ACL for the target path before that content gets created > I need a way to enhance the default logic in ModifyOperation > > For now I am dong this by > 1. Defining a custom operation 'my_modify' > 2. Implement a custom org.apache.sling.servlets.post.PostOperation > 3. Internall in custom PostOperation [2] I do my pre processing and then > use a Service reference of default ModifyOperation > (sling.post.operation=modify) and delegate to that > 4. The client would now use ':my_operation' as part of POST form data > > So wanted to confirm if above approach is fine or it would cause issues? > > Chetan Mehrotra