custom wcmcommand
I have a class RequestCommand implementing WCMCommand (com.day.cq.wcm.api.commands.WCMCommand).
When trying to implement the performCommand method, the return type (org.apache.sling.api.servlets.HtmlResponse) is deprecated and when I try to update it to the preferred type (org.apache.sling.servlets.post.HtmlResponse) shows the error "The return type is incompatible with WCMCommand.performCommand(WCMCommandContext, SlingHttpServletRequest, SlingHttpServletResponse, PageManager)"
I know I can probably use the deprecated class for now, but is there another way to do what I'm looking for potentially?
Thanks
... public class RequestCommand implements WCMCommand { public String getCommandName() { return "requestPage"; } public HtmlResponse performCommand(WCMCommandContext commandContext, SlingHttpServletRequest request, SlingHttpServletResponse response, PageManager pageManager) { ...